I would place the JavaSCript in the Control itself.
I've often had problems with JavaScript in UserControls, as they are renamed
when placed onto the ASPX page.
When you register your ASPX page, and give your tag a name, in the output
HTML that goes to INternet explorer, you controls are renamed the tag name
followed by the ID you specified.
So if you have a textbox:
<asp:TextBox id="tb"
and you register your usercontrol
TagName="MyUserControl"
In I.E. the Textbox will now have the ID
MyUserControl_tb
So when you have javascript thats referring to this ID, it will stop working
untill you change this to refer to MyUserControl_tb.
Now this becomes a bit silly, because that ID name is based on its instance
in a given ASPX page, and cannot be generalised.
There was a post a few days ago about how to get the controls name from the
code and then generate the JavaScript there with thee right ID;s
I'm just gonna dig that up (cause i need it to for future reference), and
will post shortly
HTH
"Steve Murphy" <sm*****@granite-ridge.com> wrote in message
news:eJ**************@TK2MSFTNGP14.phx.gbl...
I'd like to package a navigation bar into a user control. The problem I'm
having is getting the rollover buttons to work. Where do I place the
Javascript for the image caching and switching for the rollover effect?
I'm using image buttons.
Thanks in advance,
Steve Murphy