Hide status bar link

Discussion in 'Javascript' started by Ian Shere, Dec 19, 2003.

  1. Ian Shere

    Ian Shere Guest

    I have a disclaimer page prior to a visitor going to my FAQ page. I want to
    hide the link which normally appears in the status bar from visitors seeing
    it.

    I am using the following code which works fine except that the "I Agree"
    link still shows the link path. What's wrong - driving me nuts!!??
    <script language="JavaScript">

    <!-- Hide the script from old browsers --

    function a(txt) {

    self.status = txt

    }

    function b() {

    self.status = ""

    }

    // --End Hiding Here -->

    </script>

    <A HREF="index.html" onMouseOver="a('Return to Home Page');return true"

    onMouseOut="window.status=''; ">I Disagree</a>

    <p>

    <A HREF="freqquest.html" onMouseOver="a('Go to FAQ's Page');return true"

    onMouseOut="window.status=''; ">I Agree</a>


    --
    Ian Shere
    Tarzan Design Ltd
    Award Winning Architecture
    www.tarzandesign.co.nz
     
    Ian Shere, Dec 19, 2003
    #1
    1. Advertising

  2. Ian Shere

    VK Guest

    window.status="..."; return true;

    To activate the status change, you always have to return the true.
    It comes from NN v2 prehistory, and it has no sense or use anymore, but
    ECMA keeps it for some reason (nostalgia?).
     
    VK, Dec 19, 2003
    #2
    1. Advertising

  3. Ian Shere

    Ian Shere Guest

    Not sure exactly where that's to go - I copied it to where it seemed it
    should be and nothing worked at all. So I am back to where I started with
    the 2nd link path ALWAYS showing in the status bar and the first nicely
    displaying my message.


    --
    Ian Shere
    Tarzan Design Ltd
    Award Winning Architecture
    www.tarzandesign.co.nz
    "VK" <> wrote in message
    news:3fe253f5$0$22081$...
    > window.status="..."; return true;
    >
    > To activate the status change, you always have to return the true.
    > It comes from NN v2 prehistory, and it has no sense or use anymore, but
    > ECMA keeps it for some reason (nostalgia?).
    >
    >
     
    Ian Shere, Dec 19, 2003
    #3
  4. Ian Shere

    Ian Shere Guest

    Figured it out! It was in this piece of code - onMouseOver="a('Go to FAQ's
    Page');return true. JS was reading the ' in FAQ's as the end of that
    portion of text and then didn't know what to do with 's - I just didn't
    notice the error message in the status bar!


    --
    Ian Shere
    Tarzan Design Ltd
    Award Winning Architecture
    www.tarzandesign.co.nz
    "Ian Shere" <> wrote in message
    news:I_rEb.13646$...
    > I have a disclaimer page prior to a visitor going to my FAQ page. I want

    to
    > hide the link which normally appears in the status bar from visitors

    seeing
    > it.
    >
    > I am using the following code which works fine except that the "I Agree"
    > link still shows the link path. What's wrong - driving me nuts!!??
    > <script language="JavaScript">
    >
    > <!-- Hide the script from old browsers --
    >
    > function a(txt) {
    >
    > self.status = txt
    >
    > }
    >
    > function b() {
    >
    > self.status = ""
    >
    > }
    >
    > // --End Hiding Here -->
    >
    > </script>
    >
    > <A HREF="index.html" onMouseOver="a('Return to Home Page');return true"
    >
    > onMouseOut="window.status=''; ">I Disagree</a>
    >
    > <p>
    >
    > <A HREF="freqquest.html" onMouseOver="a('Go to FAQ's Page');return true"
    >
    > onMouseOut="window.status=''; ">I Agree</a>
    >
    >
    > --
    > Ian Shere
    > Tarzan Design Ltd
    > Award Winning Architecture
    > www.tarzandesign.co.nz
    >
    >
     
    Ian Shere, Dec 19, 2003
    #4
  5. Ian Shere wrote:

    > I have a disclaimer page prior to a visitor going to my FAQ page. I want
    > to hide the link which normally appears in the status bar from visitors
    > seeing it.


    Rule 1: If you hide something from the user, you are going to annoy people.
    Rule 2: If you hide something from the user with JavaScript, its likely to
    be trivial to unhide it

    (and I love Mozilla's "Allow Scripts to: [] Change status bar text" option)

    Security thorough obscurity is not security:
    http://www.tbray.org/ongoing/When/200x/2003/12/17/LegalInsecurity

    (and click through agreements are worthless anyway)

    --
    David Dorward <http://dorward.me.uk/>
     
    David Dorward, Dec 19, 2003
    #5
  6. Ian Shere

    kaeli Guest

    In article <bruaj1$t0n$2$>,
    enlightened us with...
    >
    > (and I love Mozilla's "Allow Scripts to: [] Change status bar text" option)
    >


    You're not the only one. :)

    I HATE when people change my status bar.

    And in IE, if I really care, I can get the properties of the link to see
    where it goes. Last resort I can view the source of the page.

    --
    --
    ~kaeli~
    If it's tourist season, why can't we shoot them?
    http://www.ipwebdesign.net/wildAtHeart
    http://www.ipwebdesign.net/kaelisSpace
     
    kaeli, Dec 19, 2003
    #6
  7. Ian Shere

    Ian Shere Guest

    Trivial for anyone who know JS yes - that accounts for a very small %age of
    net users.
    Second, hiding a link from appearing in the status bar is highly unlikely to
    annoy any but a minute number of users.
    Third, a click through agreement beats nothing at all, and certainly in
    court here, would be VERY useful.

    --
    Ian Shere
    Tarzan Design Ltd
    Award Winning Architecture
    www.tarzandesign.co.nz
    "David Dorward" <> wrote in message
    news:bruaj1$t0n$2$...
    > Ian Shere wrote:
    >
    > > I have a disclaimer page prior to a visitor going to my FAQ page. I

    want
    > > to hide the link which normally appears in the status bar from visitors
    > > seeing it.

    >
    > Rule 1: If you hide something from the user, you are going to annoy

    people.
    > Rule 2: If you hide something from the user with JavaScript, its likely to
    > be trivial to unhide it
    >
    > (and I love Mozilla's "Allow Scripts to: [] Change status bar text"

    option)
    >
    > Security thorough obscurity is not security:
    > http://www.tbray.org/ongoing/When/200x/2003/12/17/LegalInsecurity
    >
    > (and click through agreements are worthless anyway)
    >
    > --
    > David Dorward <http://dorward.me.uk/>
     
    Ian Shere, Dec 20, 2003
    #7
  8. Ian Shere wrote:

    Please read: http://www.allmyfaqs.com/faq.pl?How_to_post

    > Trivial for anyone who know JS yes - that accounts for a very small %age
    > of net users.


    Or who don't know JS but know how to turn it off
    or look at the HTML source
    or right click and copy link location
    or ...

    > Second, hiding a link from appearing in the status bar is highly unlikely
    > to annoy any but a minute number of users.


    But a much larger proportion of users who bother to look at the status bar

    > Third, a click through agreement beats nothing at all, and certainly in
    > court here, would be VERY useful.


    I'm not an expert in this field, but I find it highly doubtful that it will.
    How do you prove they clicked through?

    --
    David Dorward <http://dorward.me.uk/>
     
    David Dorward, Dec 21, 2003
    #8
  9. Ian Shere

    @SM Guest

    Ian Shere a ecrit :
    >
    > Figured it out! It was in this piece of code - onMouseOver="a('Go to FAQ's
    > Page');return true. JS was reading the ' in FAQ's as the end of that
    > portion of text and then didn't know what to do with 's - I just didn't
    > notice the error message in the status bar!


    You have to use \' insteed of '

    <A HREF="freqquest.html" onMouseOver="a('Go to FAQ\'s Page');return true"
    onMouseOut="window.status=''; return true;">I Agree</a>

    onmouseover
    and
    onmouseout
    ! !

    ==== how to use window.status =====

    <script type="text/JavaScript"><!--

    // default status message
    stat = "My so pretty home page on Net";
    // default status (NN)
    defaultStatus = stat;
    // not clever browsers with default status
    ie = (document.all || document.getElementById);
    // special function to get back default message (not for NN)
    function b() { if(ie) {window.status = stat; return true;} }
    // to display a message in status bar
    function a(txt) { window.status = txt; }
    // launch default status (on IE)
    onload = b;

    // --></script>

    <A HREF="freqquest.html" onmouseover="a('Go to FAQ\'s Page');return true;"
    onmouseout="b();">I Agree</a>
     
    @SM, Dec 21, 2003
    #9
  10. VK wrote:

    > window.status="..."; return true;
    >
    > To activate the status change,


    which one does not really want

    > you always have to return the true.
    > It comes from NN v2 prehistory, and it has no sense or use anymore, but
    > ECMA keeps it for some reason (nostalgia?).


    What are you talking about? There is no `status'
    property in ECMAScript as `window' is a host object.


    PointedEars
     
    Thomas 'PointedEars' Lahn, Dec 28, 2003
    #10
    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,594
  2. John Hann
    Replies:
    0
    Views:
    6,159
    John Hann
    Aug 21, 2004
  3. axelman
    Replies:
    1
    Views:
    962
    bruce barker
    Jul 18, 2008
  4. axelman
    Replies:
    1
    Views:
    319
    bruce barker
    Jul 18, 2008
  5. Ronen Yacov
    Replies:
    1
    Views:
    250
    David Dorward
    Nov 5, 2007
Loading...

Share This Page