The best way to disable javascript link shown in status bar?

Discussion in 'Javascript' started by howa, Feb 17, 2007.

  1. howa

    howa Guest

    a traditional javascript usage such as

    <a href="javascript:void(0)" onclick="xxx"....

    or

    <a href="javascript:doSomething()"

    will both show the javascript link on the browser status bar...of
    course you can use onmouseover to set the status bar text...but you
    need to do on all the link....a little over kill....

    anyway recommended mehod?
    howa, Feb 17, 2007
    #1
    1. Advertising

  2. howa

    Randy Webb Guest

    howa said the following on 2/17/2007 11:16 AM:
    > a traditional javascript usage such as
    >
    > <a href="javascript:void(0)" onclick="xxx"....
    >
    > or
    >
    > <a href="javascript:doSomething()"
    >
    > will both show the javascript link on the browser status bar...


    Then don't use a javascript: pseudo-protocol.

    > of course you can use onmouseover to set the status bar text...


    Not really. Not anymore. Browsers are getting more and more offended by
    authors changing the status bar text.

    > but you need to do on all the link....a little over kill....


    You could do it with one loop in an onload of the body.

    > anyway recommended mehod?


    <a href="someWhereUsefulForPeopleWithoutScripting.html"
    onclick="xxx;return false;">

    If all you want is the onclick of some text, use a button or a span and
    use the onclick event of that element. End of problem.

    Hack:

    <a href="This is status bar text" onclick="someFunction();return false">

    Want nothing in the status bar?

    <a href="" onclick="someFunction();return false">Link with no status bar
    text</a>

    --
    Randy
    Chance Favors The Prepared Mind
    comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
    Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
    Randy Webb, Feb 17, 2007
    #2
    1. Advertising

  3. howa

    Guest


    > Hack:
    >
    > <a href="This is status bar text" onclick="someFunction();return false">




    HAHA! I love that, I'm going to start using it.
    , Feb 18, 2007
    #3
  4. howa

    howa Guest

    On Feb 18, 2:35 pm, "" <> wrote:
    > > Hack:

    >
    > > <a href="This is status bar text" onclick="someFunction();return false">

    >
    > HAHA! I love that, I'm going to start using it.


    this is really COOL !!!

    XDDD
    howa, Mar 19, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    0
    Views:
    3,538
  2. John Hann
    Replies:
    0
    Views:
    6,066
    John Hann
    Aug 21, 2004
  3. Matt
    Replies:
    9
    Views:
    70,825
  4. Mete Akalýn
    Replies:
    1
    Views:
    408
    Mete Akalýn
    Jul 25, 2003
  5. Matt
    Replies:
    9
    Views:
    538
    kaeli
    Aug 23, 2004
Loading...

Share This Page