|
-
Oct 7th, 2008, 12:28 AM
#1
Thread Starter
Addicted Member
Register javascript in codebehind is not working
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
Failing to plan is Planning to fail 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|