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!

onMouseOver

Status
Not open for further replies.

rezzij

Instructor
Mar 30, 2004
48
US
I am trying to use the onMouseOver command in an image map, it works perfectly in Netscape 7.x, not in IE v6 ...
However, the onMouseOut command works perfectly ... anyone have a clue or a tip ? Both are located in the area tag ...

onMouseOver="window.status='check out Tek-Tips Forum'; return true;"

onMouseOut="window.status='pick an icon !'; return true;"

thanks for all responses ...
 
Do you have the status bar set to be visible? Click on View at the top. If there's not a check mark next to Status Bar, then you should click on that choice to make it visible.

Lee
 
yes, it is ... the one command (onMouseOut)works perfectly, other (onMouseOver) not - unless you are in netscape. IE seems to handle it a bit differently



thanks for replying
 
Do you have an online expample of this? Seems to me there must be something else that's making your code not work.
 
In my IE, the browser DOES write your onmouseover message, but then quickly replaces it with the message "Shortcut to..." (filling in the address of the HREF attribute).

If I drop the HREF attribute all together, however, and add an onclick="document.location=', then the mouseover message hangs around.

'hope that helps.

--Dave


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
O Time, Strength, Cash, and Patience! [infinity]
 
To turn on the ability for Javascript to change the status bar text in Firefox, use the following:

Tools > Options > click the Advanced button > make sure the checkbox beside "Change status bar text" is ticked.

This has always been the case in FF as I recall.

Cheers,
Jeff

[tt]Jeff's Page [/tt][tt]@[/tt][tt] Code Couch
[/tt]

What is Javascript? faq216-6094
 
I think they may have introduced something in Windows XP SP2 that prevents you overwriting the status bar text, which may be why it's working/not working on IE for some people. It's a security measure to prevent this sort of thing:
Code:
<a href="[URL unfurl="true"]http://my-nasty-spyware-url.com"[/URL] onMouseOver="window.status='[URL unfurl="true"]http://www.google.com';[/URL] return true;">Google</a>
Personally, I find it irritating when people overwrite the status bar - I wanna know where a link is taking me. How about putting that bit of text (if you really need it) in the link's title attribute instead?

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
How about putting that bit of text (if you really need it) in the link's title attribute instead?
Which will help non-javascript users as well as provide a (hopefully) more accessable solution (which will lead to better Search Engine pickup and happier campers).

Cheers,
Jeff

[tt]Jeff's Page [/tt][tt]@[/tt][tt] Code Couch
[/tt]

What is Javascript? faq216-6094
 
thanks all
I have been using the title attrib, but am disappointed in the time lag ... I have always been a Netscape fan, and it has always worked there, I occacsionally jump into IE - and it doesn't work. I like the 'onclick' solution as an option - but dislike the lack of a 'link' cursor. I understand perhaps the MS reasoning behind preventing the "spoofing" or misdirection capability, but get annoyed when I can't figure out why it won't work. Having the onMouseOut still work makes it more confusing - to me anyway - although I agree it might not have the same potential for misdirection.
 
If it is just the cursor issue, you can change that easily through css. However, I would strongly advise doing everything you're doing. Like Chris said, changing the status bar text on links was blocked in IE6 for security reasons. That is the reason why onmouseout works. It is not problematic not to show default status bar text when not hovering over the link. And since FF has it off by default as well, that clearly shows that tampering with that is unreliable (won't work cross-browser by default) and not suggested.

What is wrong with the onclick solution? It is a javascript solution to simulate link behaviour. Browsers with JS turned off and especially spider bots will not be able to browse your site.

What is so good about the title attribute? It will work in all browsers (as shown above, the status line change won't work in IE6 and FF). It will display a nice tooltip that everyone can read. It will not annoy anyone (just like Chris, I hate it with passion -- and tend not to visit the site if not neccessary -- when people change their status line).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top