Hi friends,

I am using Asp.Net application. From my codebehind i call the javascript function. so i am using,

Page.ClientScript.RegisterStartupScript(Me.GetType(), "onLoad", "showcontent()", True)

Now i registered script.Now i call the function showcontent in my contentpage.


<script type="text/javascript" language="javascript">
//window.onLoad=showcontent();
function showcontent()
{
alert("enter");
}

while my contentpage load, this script fire and give alert message.But it doesn't fire.It gives script error. ie

"missing ;before statement.[Break on this error] showcontent()Sys.Application.initialize();\n

This error is happened in firefox. Run in IE nothing happened. The script is not fired in IE. what is the problem? I cant find it.

Please help me if u can.

Hope ur's reply

Thanks