Hide Status Bar text on active hyperlink

css Singapore
  • 14 years ago

    Hi Members

    I have  a problem. I want to hide the url of the hyperlink from the visitors. For this i am using the code a

    <a href=http://www.mysite.com/ onMouseOver="window.status=''; return true;" onMouseOut="window.status=''; return true;">My Link </a>

    It works fine when user mouse over on the hyperlink as it doesn't show the url. but when user Press the Hyperlink it show the url till the mouse button is clicked on the hyperlink.

    is there any thing to stop this

    Help Plz

    Aloha

  • 14 years ago
    You might want to add the following event handlers also to ensure that no link is displayed in the status bar:

    onmousedown="window.status=''; return true" onmouseup="window.status=''; return true"

    So, the line becomes:

    <a href=http://www.mysite.com/ onMouseOver="window.status=''; return true;" onMouseOut="window.status=''; return true;" onmousedown="window.status=''; return true" onmouseup="window.status=''; return true>My Link </a>

    You could just setup a javascript function to do this for you if you have a lot of links that need this, but if not, this will do fine.







  • 14 years ago

    This does beg the question, though, why do you want to pull the wool over your users' eyes?

    Is the link a .exe or something? Sounds potentially malicious to me! Wink [;)]

    Most browsers will inform the user of the link, and then warn the user about anything which could potentially harm the user's computer.

  • 14 years ago

    Hi Paul

    well my purpose is na to put any exe or any thing harmful to the users, But I am making a photo album which is under s user login, and it shows the images from diffrent folders depending upon the type of users, Now if a user will get to know the actual path of the folder then he.she would open the files from there. i only want to stop that.

    Hope its okay :)

  • 14 years ago

    Thanks Soulistic,

    I tird the above code but its giving the same problem, On mouse clicked It shows the url of the hyperlink.

    is these any way to use  javascript function on href which returns the url like

     

    <a href="BLOCKED SCRIPTgetURL()" > Link </a>

    any idea?

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“XML is like violence - if it's not working for you, you're not using enough of it.”