Member Offer
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Hello all and help with JavaScript

Discussion in 'Website Design Forum:' started by Wizard, Jun 14, 2010.

  1. Wizard

    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:

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

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

  2. Mark Alexander

    Mark Alexander Senior Member

    Works in IE. Firefox doesn't let you do this AFAIK, probably true for the other 'other' browsers too.
  3. Wizard

    Wizard Junior Member

    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.
  4. Jazajay

    Jazajay Active Member

    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:

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

    Otherwise is not setting it to nothing. :)
  5. Wizard

    Wizard Junior Member

    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.

Share This Page