Home All Groups Group Topic Archive Search About

Allow multiple image swap onmouseover

Author
28 Dec 2005 2:44 PM
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

Author
28 Dec 2005 5:02 PM
Cowboy (Gregory A. Beamer) - MVP
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!
***************************


Show quoteHide quote
"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
>
>
Are all your drivers up to date? click for free checkup

Author
28 Dec 2005 6:56 PM
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.

Bookmark and Share