|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Allow multiple image swap onmouseoverHere is my question:
I can swap an image with the following line under Page_Load. ImageButton1.Attributes.Add("onmouseover", "this.src='menu1on.gif'") What I want is to swap more than one image onmouseover. Is this possible? What is the syntax? I tried variation sof this: ImageButton1.Attributes.Add("onmouseover", "this.src='menu1on.gif'; image1.src='menuitem1.gif'") THanks Chain the commands together, separated by semicolons. The
"this.src='menu1on.gif'" portion of the statement is javascript. You will have to know the ids of the other images to complete this. The easiest way to set it up is to create a pure javascript mouseover example (R&D) work. Once you understand syntax, it is an easy thing to do. -- Show quoteHide quoteGregory A. Beamer MVP; MCP: +I, SE, SD, DBA *************************** Think Outside the Box! *************************** "hadAnet" wrote: > Here is my question: > > I can swap an image with the following line under Page_Load. > > ImageButton1.Attributes.Add("onmouseover", > "this.src='menu1on.gif'") > > What I want is to swap more than one image onmouseover. Is this > possible? What is the syntax? > > I tried variation sof this: > ImageButton1.Attributes.Add("onmouseover", > "this.src='menu1on.gif'; image1.src='menuitem1.gif'") > > THanks > > HI,
Thanks for the input, but I do not want to use Javascript. I know there are a hundred ways of writing different scripts, but I want to know if I can modify the 'attributes.add' code for multiple images. This is the simplest way to do it and I am striving for clean, efficient app development. If so, please provide working syntax example. Thanks.
Other interesting topics
ViewState: why?
Nested asp.net application Excluding files Basic formatting for HTML in ASP.NET 1.1 ? What caused the postback? Access to a HiddenFiled in a Content control from javaScript masking url in datagrid hyperlink column in status bar Erro no start pag Scrollbar in gridview Overriding default skin |
|||||||||||||||||||||||