Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Try this one!

Status
Not open for further replies.

TGWW

Technical User
Feb 20, 2001
26
GB
I need a script that onMouseOver any and all elements on a page will swap and image!

Can anyone help!

Thanks

:eek:)
 
I need an image to change when the mouse moves over any part of the page.
 
in IE, you can rely on event bubbling and after creating a changeImage function, you could use:

<body onmouseover=&quot;changeImage()&quot;>

Because the events bubble up towards the document in IE. In NS6, you can specify whether an event should bubble. I forgot how, but you can use a script from this website that emulates IE type stuff for netscape 6:




jared@aauser.com -
 
ohhh i forgot to mention it cant rollover on any <div> elements!!!
 
so in the divs, just put:

<div onmouseover=&quot;window.event.cancelBubble=true&quot;

I have a faq on this: faq216-425 jared@aauser.com -
 
Cool that works great in IE .. but it dont work and that stupid excuse for a browser Netscrape. Any ideas?
 
OK but i dont understand how i can use

stopPropagation

and

cancelBubble

 
the faq explains what cancelBubble does... the ieemu lets you pretend you are coding for IE. you just include the file in your page after testing to see if the browsers is mozilla/netscape6 jared@aauser.com -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top