Closed Thread Icon

Topic awaiting preservation: Rollover selected state ? (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8056" title="Pages that link to Topic awaiting preservation: Rollover selected state ? (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Rollover selected state ? <span class="small">(Page 1 of 1)</span>\

 
Ultra
Nervous Wreck (II) Inmate

From:
Insane since: Jan 2002

posted posted 01-31-2002 13:26

I need to set up a nav with a series of rollover
i'd like to have a selected state for each buttons....
I had a search for a bit of code about this but i haven't had any luck

Can someone help me out ?

Thank you

Ultra

::UltrA::

kuckus
Bipolar (III) Inmate

From: Berlin (almost)
Insane since: Dec 2001

posted posted 01-31-2002 14:22

What exactly do you mean? Do you want the image to change after someone clicked it? Then you could add a onclick="..." event handler to it, which calls the rollover function just like the onmouseover event does. You'll just have to let it switch to another image, which then will be displayed until the linked page loads. Or are you looking for a different effekt?


CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 01-31-2002 14:53

Yes, remember you can do the old "swap" images on the onMouseOver and onMouseOut, then you have onClick, onMouseDown and onMouseUp. You could put a "swap" on each of these. Or do you want multiple mouse overs?

You can use Doc's script if you scroll down to the bottom of this page and click on the "Hands On" button.

Later,
C:\


~Binary is best~

Ultra
Nervous Wreck (II) Inmate

From:
Insane since: Jan 2002

posted posted 02-01-2002 02:45

yes i want to have buttons (using images) with a up state and a hover state but i'd like to ad a onclick function
thank you
i'm going to try again.....

i let you know if i get stucked

Ultra

::UltrA::

Ultra
Nervous Wreck (II) Inmate

From:
Insane since: Jan 2002

posted posted 02-01-2002 04:36

Is still not working when i ad the onclick function the image on mouse over just chnge to the over state and never go back to the up state

anyone know what code should i use?

i found a tutorial on it but doesn't work with netscape.....

U.

::UltrA::

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 02-01-2002 05:41

Ultra, make sure you read Doc's tute too: http://www.handson.nu/CODING/javascript.shtml
That should help.

kuckus
Bipolar (III) Inmate

From: Berlin (almost)
Insane since: Dec 2001

posted posted 02-01-2002 08:50

So you already have the onMouseOver effekt working, haven't you? That's a good thing, since everything else is very similar:

Next you'll have to add a onMouseOut event that calls the same function and swaps to the image that was originally displayed. After that, it's a standard roll-over.

To swap the image again after someone clicked on it, you need to add another event handler, this time it's onClick. Again, it should call the function that is called by onMouseOver, the only difference is that the image to swap to should be a third one.

For the whole effekt you need three images: image1 is displayed after loading the page. As soon as the mouse hovers it (that's onMouseOver), it swaps to image2, and and onMouseOut it swaps back to image1. And finally, image3 is displayed after you click the button (onClick).

And if you won't get it to work this way, just post a link to the page, could also be something else that's causing the problem!

have fun!
kuckus

« BackwardsOnwards »

Show Forum Drop Down Menu