Allow multiple image swap onmouseover

H

hadAnet

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
 
G

Guest

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.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
H

hadAnet

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,522
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top