Click to See Complete Forum and Search --> : satus bar message


rabbitboy
10-25-2003, 01:30 PM
i want the staus bar to say s n o w b o a r d i n g all the time, evan if you go over a lnk, the code below works fine for normal links, but it don't work on Hot spots, how can i chnage it to work? or can u give me another code?

<script language="javascript">
window.defaultStatus="s n o w b o a r d i n g";
</script>
<script type="text/javascript">
function setLinks() {
for (i=0; i<document.links.length; i++) {
document.links[i].onmouseover = function () {
window.status="";
return true;
}
}
}
window.onload = setLinks;
</script>

Jona
10-25-2003, 03:57 PM
Originally posted by rabbitboy
[B]ut it doesn't work on Hot spots, how can I change it to work?

Hot spots?

[J]ona

AdamGundry
10-26-2003, 02:30 AM
Assuming that by hotspots you mean <area> tags, note that you must include the href attribute within the area tag (according to the JS 1.3 docs). Otherwise, that code should work, because <area> tags appear in the links array.

Be aware that overwriting the browser's default behaviour may not be a good idea because it annoys users and disorients them. Personally, I have customised my browser so that scripts cannot change my status bar. :)

Adam

Jona
10-26-2003, 07:31 PM
Originally posted by AdamGundry
I have customised my browser so that scripts cannot change my status bar. :)

Sweet! Mozilla, right? How'd ya do it? :D

[J]ona

AdamGundry
10-27-2003, 02:04 AM
Ok, maybe "customised" is a little to strong a word. On the Advanced > Scripts & Plugins section of the Preferences dialog, all you need to do is uncheck "change the status bar text".

Adam

Jona
10-27-2003, 11:52 AM
Thanks, I need to explore the options of Moz...

[J]ona