Hello all and help with JavaScript

Wizard

Junior Member
Hi guys.

I've just become a new member and wondered if anyone could help me with a JavaScript problem.

I'm still fairly new to JavaScript and I'm doing an exercise which should display a message in my Status Bar. I can't see any errors in the coding but I simply can't get it to work. Can any of you boffins help me out? Here's the code:

<html>
<head>
<title>Display Messages in the Status Bar</title>
</head>
<body>
<a href="main.htm" target="main" onmouseover="window.status='Return to the Home Page'; return true"; onmouseout="window.status=''; return true">
Home Page
</a>
</body>
</html>

I'd really appreciate some help as I'm tearing my hair out!

Cheers
 
Hmm. Thanks Mark. I don't know!? I can't get it to work in any browser. Oh well, all the other stuff I'm doing seems to be working but it would still be great to solve this particular mystery. Thanks for taking the time to look.
 
Hay there is some issues with your code.
Never play around with the status bars tbh if you need to relie on the status bar telling your user thats what that does there is an issue there.

But you don't need to return anything here as you are not stopping a function from working for example stopping a link from executing.
So both of them can be removed.

But this:
onmouseout="window.status=''

Needs to be:
onmouseout="window.status=' ' ''

Otherwise is not setting it to nothing. :)
 
Hey Jazajay

sorry to have a taken such a long time to get back to you; I didn't know that you had posted. All sorted now . Many thanks.
 
Back
Top