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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing the window.status

Status
Not open for further replies.

dwhalen

Programmer
Feb 22, 2002
105
CA
Hey,

I know how to change the status bar on individual anchor tags and such by using the onMouseOver="window.status='Hello Joe';". But is there a way to change all anchor tags to change the statusbar to the same text? I was thinking along the lines of using style sheets?

I have a lot of links that I want to change to display a more user friendly message instead of a javascript function....and I am a very lazy man. :p

thanks
 
Loop through the links array and add the events to each one:
Code:
<head>
<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
function linkStatus() {
  for (var i=0; i < document.links.length; i++){
    document.links[i].onmouseover=function(){window.status='hi';return true}
    document.links[i].onmouseout=function(){window.status='bye';return true}
  }
}
</SCRIPT>
</head>
<body onload=&quot;linkStatus()&quot;>
<A HREF=&quot;somepage.htm&quot;>....</A><br>
<A HREF=&quot;somepage.htm&quot;>....</A><br>
</body>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top