Results 1 to 6 of 6

Thread: Hiding a URL from the status bar on link hover...

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Location
    Coventry, England
    Posts
    169

    Hiding a URL from the status bar on link hover...

    I don't want users to see the ugly URLs when they hover the mouse over links/images.

    Users don't really want to see the below link when they hover over a link!

    <A href="javascript:NewWindow('Brochure_Store/Crystal.htm',300,400,'no','no','');">

    Does anyone know how I can stop this from showing on the status bar? It would look much better.

    Thanks

  2. #2
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    From memory its:

    Code:
    <a href="#" onmouseover="window.status='';">Hover</a>'
    You can also use defaultStatus but that will change the window's status until the user closes the browser, and that's a bad thing to do - it's put me off a site

  3. #3
    Fanatic Member punkpie_uk's Avatar
    Join Date
    Sep 2001
    Location
    UK
    Posts
    645
    Also, it's advisable that you move the javascript to the onclick event of the anchor. This way they can only see you're URL by viewing the source code of the web page.

    Code:
    <A href="javascript://" onclick="NewWindow('Brochure_Store/Crystal.htm',300,400,'no','no','');">
    SPREAD THE WORD!!! Are You Lee McCormick? Because I Am



    Lee M McCormick
    [email protected]

    Lee McCormick.com - Live
    Dynamically Webbed.com - In development but live

  4. #4
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    Yeah, but without the space between java and script . You can also make the href="#" and add return false; at the end of the onclick event to stop it going to the top of the page.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Location
    Coventry, England
    Posts
    169
    OK bear with me, because I haven't been doing this stuff very long..this is what i've got and it seems to do what I want it to:

    <A href="javascript:NewWindow('Brochure_Store/Crystal.htm',300,400,'no','no','')" onmouseover="(window.status='Crystal'); return true" onmouseout="(window.status=''); return true"><IMG border="0" src="../images/Crystal.jpg"></A>

    So when the user hovers the mouse over the image, the statusbar says 'Crystal', and when the user moves the cursor from the image, the statusbar is blank again. Much better than seeing javascript:blahblah.

    I have a line like this for each holiday brochure.

    I was wondering, if I could set the onmouseout='' globally, like for all links?

    Thanks

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Location
    Coventry, England
    Posts
    169
    Ah, I see what you mean about putting the javascript on the onclick event...now all the user sees is 'javascript://' when the mouse is clicked.

    My code is now like this:

    <A href="javascript://" onclick="NewWindow('Brochure_Store/Crystal.htm',300,400,'no','no','')" onmouseover="(window.status='Crystal'); return true" onmouseout="(window.status=''); return true"><IMG border="0" src="../images/Crystal.jpg"></A>


    Thanks both

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width