PDA

View Full Version : window.status=?



hp_maniac_50
06-18-2002, 06:02 AM
How do you make the Status bar have whatever text you want it to have and when you mouseover a link it will have the text you want for that link and when you mouseout it will retuen to the text you wanted? <br><br>Here is what I am doing:
<script>
<!--
window.status="I/'m superman"
-->
</script>
<a href="http://www.dynamicdrive.com/" target=new onmouseover="window.status='Dynamic Drive'" onmouseout=?>Dynamic Drive</a>

Zvona
06-18-2002, 08:44 AM
Easily by using defaultStatus property.
Like :


<script type="text/javascript">
defaultStatus = "This is default status text.";

function setStatus(sStatus)
{
window.status = sStatus;
return false;
}

function getStatus()
{
return window.status;
}
</script>

<body>
<a href="#" onmouseover="setStatus('Hello');">Hover me First</a>
<a href="#" onmouseover="setStatus('World..');" onmouseout="setStatus('..and rest of you!');">..then Me</a>
</body>

landon11
06-20-2002, 06:51 PM
That code didn't work for me so here is another way:



<html>
<head>
<script type="text/javascript">
defaultStatus = "This is default status text.";
</script>
<body>
<a href="#" onMouseOver="window.status='Link Description'; return true">This is a link</a>
</body>
</html>