PDA

View Full Version : Status Bar Text: onMouseover, but goes away onClick.


bacterozoid
10-19-2002, 08:05 PM
Generally I don't use this type of code, but sometimes its useful:


<a href="javascript:chgImg(-1)"
onMouseover="window.status='Previous Image';return true"
onClick="window.status='Previous Image'"
onMouseout="window.status=''">Previous</a>


As you can see, if I were to hover over that link you would see the nasty JavaScript command down in the status bar, and I want to avoid that. It works when you hover, but changes to the command script when you hold the mouse button down on the link. Help! Lol.

To SEE what I mean, http://www.geocities.com/jon_zie/band/homepage.htm Go there, and the slideshow links are what I am talking about.

Simrey
10-19-2002, 08:39 PM
For what it's worth (and I know this isn't going to help you solve the problem) it is perfectly behaved in IE5 on my Mac. I was helpfully going to test it in Netscape but ummm -- was warned off, I'm afraid.


Simon

bacterozoid
10-19-2002, 08:43 PM
Lol, I see you met my nice Netscape warning. I am using IE6 on my...uh, non-mac, and I suppose that might make a difference. Well now I know it works sometimes...Thank's for your input!

Graeme Hackston
10-19-2002, 08:50 PM
<span class="fake-link" onmouseover="this.className='fake-link-over'" onmouseout="this.className='fake-link'"> link</span>

Graeme Hackston
10-19-2002, 08:55 PM
This is more complete

function S(message) {
window.status=message; return true
}

<span class="fake-link" onmouseover="this.className='fake-link-over';return S('Status')" onmouseout="this.className='fake-link';return S('')">link</span>

bacterozoid
10-19-2002, 09:09 PM
Originally posted by Graeme Hackston
This is more complete

function S(message) {
window.status=message; return true
}

<span class="fake-link" onmouseover="this.className='fake-link-over';return S('Status')" onmouseout="this.className='fake-link';return S('')">link</span>

Mmhmm, I see...I could fiddle with that, but you think you could help me out here...I'm not exactly getting what to put where.

Graeme Hackston
10-19-2002, 09:12 PM
Sorry, I think you also need to add this

onClick="chgImg(-1)"