Welcome to WebmasterWorld Guest from 54.161.25.142

Forum Moderators: incrediBILL

Message Too Old, No Replies

Scrub Status Bar messages

     
4:49 am on Apr 26, 2001 (gmt 0)

10+ Year Member



I have this code for scrubbing (or adding) the messages in the status bar.

onMouseOver=" window.status='Go back to my home page by clicking on that link!'; return true" onMouseOut="window.status=' '; return true"

Question is...is there a way to do this globally on a page instead of doing every (hidden css'ed) link on the page?

7:11 am on Apr 26, 2001 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I can't see a way to do this globally, BH. You've just got to have those event handlers on each link.

It certainly sounds like you're up to somthing intriguingly devious ;)

8:33 am on Apr 26, 2001 (gmt 0)

10+ Year Member



I really like this find the hidden links in front of your face game you can play with css. All done in css level 1 and IE even lets you "adjust" the cursor to a text cursor...now if I could just disable the status bar from an external file ..... A little negative positioning and [6]Wham[/6] we got a cloaked page in broad daylight.

Xoc

3:55 pm on Apr 26, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Actually you should be able to put JavaScript on the mouseover and mouseout events of the body tag, taking advantage of event bubbling to make it work. You will then need to somehow differentiate what you are moving the mouse over and out of, such as a class identifier on the individual links.
4:32 pm on Apr 26, 2001 (gmt 0)

10+ Year Member



I dont know how to do that Xoc...I am obviously using css classes on the hyperlinks. Could the js be told only to work when the cass is present?
7:39 pm on Apr 26, 2001 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Xoc, I understood that only IE used the event bubbling model and Netscape is almost upside down in comparison.

Xoc

9:56 pm on Apr 26, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, never quote me on anything related to client-side JavaScript! You are probably right about it not working in Netscape.

Boneheadicus, yeah, that's the idea. You look at the class of the item that generated the onMouseOver event and if it is the right class then you do something appropriate.

Event bubbling is based on the concept that there is a tree of tags, leading from <body> down to the tag that is generating the event. When you move the mouse over something, it generates the onMouseOver for the local tag, then generates the onMouseOver for the next tag up, etc., until it reaches the <body> tag. Any given event handler can stop the bubbling up to the next the tag. So that allows you to put global event handling on the <body> tag. Your JavaScript can then look at the thing that caused the event and determine if it wants to do something or not. I've seen it work, but have never used it for anything practical.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month