...

View Full Version : need rollover effect w/o link



ericjt
07-09-2003, 02:11 AM
Is there a way or workaround for this? I want to use mouseover effects but without the clickable link involved, so the image changes but clicking has no (detectable) effect, and preferable where clicking does not put a fine dotted marquee around the image, perhaps even without the cursor turning to a pointing hand. I thought of having the link open an invisible div layer or something, but I am very new to javascript and haven't had time to play with that yet. I just want an interactive visual effect on the page.

wickford
07-09-2003, 02:22 AM
Here's what I think you're looking for:

http://www.dynamicdrive.com/dynamicindex15/domroll.htm

Kor
07-09-2003, 11:17 AM
the wickford example is not exactly what ericjt is looking for. Furthermore, it works for IE only.

I think you can obtain that kind of effect when onclick if you include the event inside a "neutral" dividing tag, such as DIV, whith the image inside, instead of includung that event in <a href> tag (the latter will always make visible that fine dotted marquee you mentioned.

try something like:
<div onclick="somefunction()">
<img src="image.gif">
</div>

ahosang
07-09-2003, 01:00 PM
quite simply:
<img src="before.gif" onmouseover="this.src='after.gif'" onmouseout="this.src='before.gif'">
And it helps to have the image preloaded

wickford
07-09-2003, 02:20 PM
Good one ahosang. I should have thought of that.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum