hi
i realy cant guess what i'm doung wrong
i'm trying to fire a simple oninit event.

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
</head>
<body oninit="alert('hi');">
    <form id="form1" runat="server">
    <div>
        <asp:ContentPlaceHolder ID="cph2" runat="server">
        </asp:ContentPlaceHolder>
    </div>
    </form>
</body>
</html>

this works perfectly with onload event.

The event you are looking for is onload , not oninit :

<body onload="javascript:alert('hi');">
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.