I have an image button and I would like the image to change when I move the mouse over the button. The button is located within a user control (not a webform)
Here is the javascript I have in the user control[tt]
<script language=javascript>
imgBtnSearch = new Image();
imgBtnSearch.src = "\GalleryCatalog\Image\arrow_sel.gif";
</script>
[/tt]
Note: since this is a user control the script will be written in the body of the text, not the header.
Here is the vbcode to add the javascript attributes.[tt]
imgBtnSearch.Attributes.Add("onmouseover", "imgBtnSearch.src='\GalleryCatalog\Image\arrow_sel.gif';"
imgBtnSearch.Attributes.Add("onmouseout", "imgBtnSearch.src='\GalleryCatalog\Image\arrow_unsel.gif';"
[/tt]
I piece mailed this code together from google and forum searches.
The code doesn't error out, but it also does not execute at all. any ideas? thanks for your help.
Jason Meckley
Database Analyst
WITF
Here is the javascript I have in the user control[tt]
<script language=javascript>
imgBtnSearch = new Image();
imgBtnSearch.src = "\GalleryCatalog\Image\arrow_sel.gif";
</script>
[/tt]
Note: since this is a user control the script will be written in the body of the text, not the header.
Here is the vbcode to add the javascript attributes.[tt]
imgBtnSearch.Attributes.Add("onmouseover", "imgBtnSearch.src='\GalleryCatalog\Image\arrow_sel.gif';"
imgBtnSearch.Attributes.Add("onmouseout", "imgBtnSearch.src='\GalleryCatalog\Image\arrow_unsel.gif';"
[/tt]
I piece mailed this code together from google and forum searches.
The code doesn't error out, but it also does not execute at all. any ideas? thanks for your help.
Jason Meckley
Database Analyst
WITF