JavaScript vs runat=server problem

  • Thread starter Thread starter Tina
  • Start date Start date
T

Tina

I have been running a javascript function called from <body
onload="setcursor" ....

But recently I had to add id="mybody" and runat="server to that body tag for
other reasons. Now it won't run my javascript because it apparently thinks
I'm calling a server side function.

How can I execute a javascript function from the body where I also have
runat"server" ?

Thanks,
T
 
Try one of the other ways of attaching handlers, for instance, you can use
the <script ...> element to attach an event to an object. Take a look at
the documentation for the onload JS event.
 
I saw those forum answers that have you put script blocks right after the
<body /> but it does not work.
T
 
Tina,
put in OnPreRender :
this.mybody.attributes.Add("onload","setcursor();")

HTH

Ciaran
 
Back
Top