Suppress status bar message

When I click on a link, how can I get it to not show the link in the status bar?
IE5+
LVL 2
kaller2Asked:
Who is Participating?
 
thirdConnect With a Mentor Commented:
i don't think onmouseout is still necessary.


"When I click on a link, how can I get it to not show the link in the status bar?
"

the solution stated above is just for the onmouseover event and does not solve your original problem which comes out onclick. the message is shown upon opening the next page (like, "opening www.google.com ....") and it's a system message to inform a user what page is currently being loaded. i don't think you can prevent that from happening. just think it as for security purposes.

0
 
lexxwernCommented:
<a href="..." onmouseover="window.status=''"  onmouseover="window.status=''">Link</a>
0
 
lexxwernCommented:
But i dont think you should do that as it leaves your visitors handicapped. or atleast they get such feeling.
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
thirdCommented:
i.e. when you mouse over but it will still show up when u click. try it!
0
 
lexxwernCommented:
then onmousedown
0
 
lexxwernCommented:
and while kaller2 you're here; ild like to bring to your notice the following Q asked by you
http://www.experts-exchange.com/jsp/qShow.jsp?ta=delphi&qid=10231356
It is pretty old and it seems you have not got a proper answer. so please delete it.

thankyou.

lexxwern
0
 
lexxwernCommented:
<a href="..." onmouseover = "window.status=''"  onmouseout = "window.status=''" onmousedown = "window.status=''">Link</a>
0
 
thirdCommented:
are you sure? have u tested it?
0
 
lexxwernCommented:
well i just tested it and third was right. when you click on it the url does appear, and here is the complete ver. of the code...

<a href="http://www.yahoo.com"
onmouseover = "javascript:window.status='';return true;"
onmouseout = "javascript:window.status='';return true;">Link</a>


lexxwern
0
 
kaller2Author Commented:

Doesn't work.

<html>
<body>
<a href="xyz" onmouseover="window.status='';return true;" onmousedown="window.status='';return true;" onmouseout="window.status='';"return true;">click me</a>
</body>
</html>

You can still see the href the first time you click down.
0
 
lexxwernCommented:
<a href="http://www.yahoo.com"
onmouseover = "javascript:window.status='';return true;"
onmouseout = "javascript:window.status='';return true;">Link</a>

this will work. it has been tested this side. and yes onomouseout is not necessary, but it wont do harm.
0
 
thirdCommented:
lexxwern,

try to focus on the status bar. you will see there something like,

"Opening page http://www.yahoo.com/"

it's a split second so don't BLINK. ;-)

(you're machine is maybe too fast...)
0
 
kaller2Author Commented:
NO its easy, just press the mouse down and don't release it
There you can read the href.

So i ask again, my original question,
how can I suppress the status bar message?
0
 
kaller2Author Commented:
NO its easy, just press the mouse down and don't release it
There you can read the href.

So i ask again, my original question,
how can I suppress the status bar message?
0
 
lexxwernCommented:
okay. i know. but kaller2 this is the closest you can get to what you want.

This is the most you can do...
0
 
kaller2Author Commented:
I deleted that old post BTW. Thanks.

"  it's a system message to inform a user what page is currently being loaded. i don't think you can prevent
that from happening. just think it as for security purposes."

You mean for insecurity purposes surely?

My code actually has an href set to a javascript function
with lots of parameters which I don't really want to appear on the browser status line.  For one thing it is visually distracting flickering.
For another its not a url they would recognise.
For another its meaningless to them.
Granted they can view source, but I made that difficult
for the bunnies anyway, plus I use frames so they
generally don't get to see urls unless there is a good reason.

Are you saying that it is not possible to stop href
data appearing on the status line?

0
 
thirdCommented:
yup! and no matter how deep you hide your codes, it can still be viewed. there are lots of ways to find it so it's impossible. we are bound with limitations so we need to live with that.
0
 
lexxwernCommented:
but hiding onmouseover still can do quite a good deal of hiding, abiet not complete hiding.

btw, thanks for getting rid of old Q.
0
 
jambo88Commented:
To stop the anchor href from appearing, code the mouse events (cross browser for NN 4.x, IE 5.x): onmouseover, onmousedown, onmouseup

Good link:
http://www.webreview.com/1999/10_22/webauthors/10_22_99_2.shtml
0
 
CJ_SCommented:
<a href="What you wanna show" onClick="location='yournewpage.htm';return false;">Click here</a>
0
 
kaller2Author Commented:
Nobody has answered my question.
I want to stop the href appearing in the status window.

The methods that everyone has suggested DO NOT WORK because all you have to do is to press the mouse down and
hold it down on a link and a BIG UGLY HREF appears messing up the nice looking browser.
Who wants to see something like this in the browser status window?

javascript:myfunction('validation_check', 'confirm' 'true', 'false')

Even a friendly message would be better, like "You can let the mouse go now!"

The best information so far seems to have come from
"THIRD" who is answering my question, and suggests it cannot be done.  

I tested it carefully and I just noticed that it is only the first time that the href shows.  When I come BACK to the same screen it doesn't show any more, and gives the behaviour I want, so it seems to be some kind of initialisation thing????


0
 
lexxwernCommented:
well, it basically cannot be done fully, the little that can be done has been suggested, CJ_S's solution was kind of different and it should work perfect, but i have not tested.

listen the best thing that you can do is change the

window.status=''

in the events of your choice. these events are,

onmouseover,
onmousedown,
onmouseout,

look above for an example,

and one more thing, you can be rest assured that your visitor will not look at the status bar keeping a link pressed if the content is on the page. i dont understand why do certain designers care so much about these tiny things...

anyway Good Luck,

lexxwern
0
 
kaller2Author Commented:

Since the internet does not guarantee a realtime response, a page may take some time to be serviced so that means that the application is in a certain status with the status bar.  The user does not have to sit there with his/her finger on the mousebutton for the status bar to hold information long enough to be read.

The whole idea of the status bar is for users to look there for guidance.  Should I tell them to look there sometimes, and not to look there at other times?  

0
 
axis_imgCommented:
Just another option, but not necessarily the best by any means...

<html>
<head>
<script language="javascript">
<!--

var delay     = 100;          // in milliseconds
var message     = "Thanks";

function set_status() {
     window.status = message;
}

setInterval("set_status();", delay);
//-->
</script>

</head>
<body>
<a href="test.html" onClick="return false;">Test</a>
</body>
</html>

Basically, it just sets the interval to set the window status to "Thanks" 10 times a second, or whatever value you set the "delay" variable to be. If you set the value lower, then the function will fire off quicker and the status message changes more quickly when you mouseover or click on something. Honestly, this is a nasty thing to do, but you asked. I would prefer CJ's example over this one, just because you don't have a function firing off repeatedly in the client's browser. I have never had a problem with it slowing down the client, but doesn't mean that it couldn't happen.

I am heading to bed... Good luck.
Regards.

PS: long time no see, CJ :-)
0
 
kaller2Author Commented:
There must be some logical explanation or else it must be a bug.  Maybe the mouseover on a link applies to the current page whereas the mousedown is supposed to apply to the next page which hasn't loaded yet?

Because I noticed that after a page is cached then the mousedown DOES change the status line....

Thanks for the timer idea.  I could maybe start it on mouse down and stop it on mouse up !
0
 
kaller2Author Commented:
Well the timer works to a point, but it stuffs up in the case where you click down and then slide off and release the mouse elsewhere.

I am going to use this:

 <a href="#"
      onclick="window.location='http://www.yahoo.com';"
      >Click Me</a>

and give the points to third who correctly pointed out that it will show the href regardless.
0
 
kaller2Author Commented:
Another advantage of using the # as a bogus href I have discovered is that if the user bookmarks or saves the link then it returns him to the page the link is on, not the link destination.
This is good because it means that links can then safely be used to submit forms without the danger of users bookmarking or reusing them, which would cause chaos.

Another good reason why programmers often pay attention to these tiny things....  
0
 
kaller2Author Commented:
Look ma no hands!

I figured this out:

<a class="myclass" onclick="mypost(myaction)">

<form name="myform" method="post">
</form>

Set the action and submit from mtfunction
but don't return anything
or it tries to go there instead.
0
 
kiqkinasCommented:
What I present here is derived from all of the comments above so I can not take credit.

In my testing, it seems we've been presented with one pretty good alternative and only one absolute way to prevent the original stated problem which was...

"When I click on a link, how can I get it to not show the link in the status bar?"

<!-- Method 1 Obfuscate the destination address-->
<a href="#" onClick="javascript:PlayDemo('Download_Redirect.asp?300104')"
onmouseover="window.status='Click to download your file';return true;"
onmouseout="window.status='Click to download your file';return true;"
onmousedown="window.status='Click to download your file';return true;"
>Download Now</a>
<p>&nbsp;</p>

<!-- Method 2 Dodge the bullet by not using a link -->
<form name="myform" method="post">
<input type="button" value="Click to start Download" onclick="javascript:PlayDemo('Download_Redirect.asp?300104')">
</form>

0
 
kaller2Author Commented:
Thats useful to know thanks.  Actually since I posted that question I have learned a bit more about DHTML, and found the easiest solution:
You dont have to use an anchor tag of course, just say a <span> tag with the mouse events mouseover, mouseout and onclick events captured, and then the status bar seems to be fully manageable.
0
 
kaller2Author Commented:
I should add that its not a strict conformist way to do it because you then also need to manage the appearances of the links with styles, rather than defaulting to the user's styles or browser defaults for link behaviour.  
0
 
kiqkinasCommented:
That's very cool. I did a little research and came up with the following:

<Span
     onclick="window.status='';return true;"
     ondblclick="window.status='';return true;"
     onmousedown="window.status='';return true;"
     onmouseup="window.status='';return true;"
     onmouseout="window.status='';return true;"
     onmouseover="window.status='';return true;"
     onmousemove="window.status='';return true;">
     
<p>
<a href="link1.htm">Home</a>
<a href="link2.htm">Catalog</a>
<a href="link3.htm">Demo</a>
...

</span>

It still doesn't solve the problem of holding the mouse down on a link, but if you have a large number of links within a page as I do on one of my pages (the links run into the thousands) it is a very elegant way to supress the status window on every link within the <span> </span> tags without having to supress each link one at a time.
0
 
JABCreationsCommented:
Unfortunitly what you're looking for is the onmousedrag command.  This is unfortunite for two reasons.  First, its a rather new command (5.0) and second, it's not javascript (which is actually livescript); it's JScript, Microsoft's moslty crossbrowser compatble version of LiveScript.

I'm at work right now running a p4 2.4 with 640 mbs and IE 6.0, and I can not implement the onmousedrag command whatsoever.

The poster before me, Kiqkinas has a very good idea going on there.

Here is the script I put together, enjoy . . .

<html>
<head>
<title></title>
<script type="text/javascript">
      <!-- Hide script from old browsers

      function newWindow(bookgif) {
            bookWindow = window.open(bookgif, "bookWin", "width=320,height=400")
            bookWindow.focus()
      }

       -->
      </script>
<script type="text/javascript">
window.status=Copyright © 2002-2003'
</script>
<body oncontextmenu="return false"; onselectstart="return false"; onmousedrag="return false">

<Span
  onclick="window.status='Panel 01';return true;"
  ondblclick="window.status='Panel 01';return true;"
  onmousedown="window.status='Panel 01';return true;"
  onmouseup="window.status='Panel 01';return true;"
  onmouseout="window.status='Panel 01';return true;"
  onmouseover="window.status='Panel 01';return true;"
  onmousemove="window.status='Panel 01';return true;">
<a href="javascript:newWindow('01.htm')">Panel 01</a>
</span>
<br>
<Span
  onclick="window.status='Panel 02';return true;"
  ondblclick="window.status='Panel 02';return true;"
  onmousedown="window.status='Panel 02';return true;"
  onmouseup="window.status='Panel 02';return true;"
  onmouseout="window.status='Panel 02';return true;"
  onmouseover="window.status='Panel 02';return true;"
  onmousemove="window.status='Panel 02';return true;">
<a href="javascript:newWindow('02.htm')">Panel 01</a>
</span>
<br>
<Span
  onclick="window.status='Panel 03';return true;"
  ondblclick="window.status='Panel 03';return true;"
  onmousedown="window.status='Panel 03';return true;"
  onmouseup="window.status='Panel 03';return true;"
  onmouseout="window.status='Panel 03';return true;"
  onmouseover="window.status='Panel 03';return true;"
  onmousemove="window.status='Panel 03';return true;">
<a href="javascript:newWindow('03.htm')">Panel 03</a>
</span>
<br>
<Span
  onclick="window.status='Panel 04';return true;"
  ondblclick="window.status='Panel 04';return true;"
  onmousedown="window.status='Panel 04';return true;"
  onmouseup="window.status='Panel 04';return true;"
  onmouseout="window.status='Panel 04';return true;"
  onmouseover="window.status='Panel 04';return true;"
  onmousemove="window.status='Panel 04';return true;">
<a href="javascript:newWindow('04.htm')">Panel 04</a>
</span>
<br>
<Span
  onclick="window.status='Panel 05';return true;"
  ondblclick="window.status='Panel 05';return true;"
  onmousedown="window.status='Panel 05';return true;"
  onmouseup="window.status='Panel 05';return true;"
  onmouseout="window.status='Panel 05';return true;"
  onmouseover="window.status='Panel 05';return true;"
  onmousemove="window.status='Panel 05';return true;">
<a href="javascript:newWindow('05.htm')">Panel 05</a>
</span>
<br>
<Span
  onclick="window.status='Panel 06';return true;"
  ondblclick="window.status='Panel 06';return true;"
  onmousedown="window.status='Panel 06';return true;"
  onmouseup="window.status='Panel 06';return true;"
  onmouseout="window.status='Panel 06';return true;"
  onmouseover="window.status='Panel 06';return true;"
  onmousemove="window.status='Panel 06';return true;">
<a href="javascript:newWindow('06.htm')">Panel 06</a>
</span>
<br>
<Span
  onclick="window.status='Panel 07';return true;"
  ondblclick="window.status='Panel 07';return true;"
  onmousedown="window.status='Panel 07';return true;"
  onmouseup="window.status='Panel 07';return true;"
  onmouseout="window.status='Panel 07';return true;"
  onmouseover="window.status='Panel 07';return true;"
  onmousemove="window.status='Panel 07';return true;">
<a href="javascript:newWindow('07.htm')">Panel 07</a>
</span>
<br>
<Span
  onclick="window.status='Panel 08';return true;"
  ondblclick="window.status='Panel 08';return true;"
  onmousedown="window.status='Panel 08';return true;"
  onmouseup="window.status='Panel 08';return true;"
  onmouseout="window.status='Panel 08';return true;"
  onmouseover="window.status='Panel 08';return true;"
  onmousemove="window.status='Panel 08';return true;">
<a href="javascript:newWindow('08.htm')">Panel 08</a>
</span>
<br>
<Span
  onclick="window.status='Panel 09';return true;"
  ondblclick="window.status='Panel 09';return true;"
  onmousedown="window.status='Panel 09';return true;"
  onmouseup="window.status='Panel 09';return true;"
  onmouseout="window.status='Panel 09';return true;"
  onmouseover="window.status='Panel 09';return true;"
  onmousemove="window.status='Panel 09';return true;">
<a href="javascript:newWindow('09.htm')">Panel 09</a>
</span>
<br>
<Span
  onclick="window.status='Panel 10';return true;"
  ondblclick="window.status='Panel 10';return true;"
  onmousedown="window.status='Panel 10';return true;"
  onmouseup="window.status='Panel 10';return true;"
  onmouseout="window.status='Panel 10';return true;"
  onmouseover="window.status='Panel 10';return true;"
  onmousemove="window.status='Panel 10';return true;">
<a href="javascript:newWindow('10.htm')">Panel 10</a>
</span>
<br>
<Span
  onclick="window.status='Panel 11';return true;"
  ondblclick="window.status='Panel 11';return true;"
  onmousedown="window.status='Panel 11';return true;"
  onmouseup="window.status='Panel 11';return true;"
  onmouseout="window.status='Panel 11';return true;"
  onmouseover="window.status='Panel 11';return true;"
  onmousemove="window.status='Panel 11';return true;">
<a href="javascript:newWindow('11.htm')">Panel 11</a>
</span>
<br>
<Span
  onclick="window.status='Panel 12';return true;"
  ondblclick="window.status='Panel 12';return true;"
  onmousedown="window.status='Panel 12';return true;"
  onmouseup="window.status='Panel 12';return true;"
  onmouseout="window.status='Panel 12';return true;"
  onmouseover="window.status='Panel 12';return true;"
  onmousemove="window.status='Panel 12';return true;">
<a href="javascript:newWindow('12.htm')">Panel 12</a>
</span>
<br>
<Span
  onclick="window.status='Panel 13';return true;"
  ondblclick="window.status='Panel 13';return true;"
  onmousedown="window.status='Panel 13';return true;"
  onmouseup="window.status='Panel 13';return true;"
  onmouseout="window.status='Panel 13';return true;"
  onmouseover="window.status='Panel 13';return true;"
  onmousemove="window.status='Panel 13';return true;">
<a href="javascript:newWindow('13.htm')">Panel 13</a>
</span>
<br>
<Span
  onclick="window.status='Panel 14';return true;"
  ondblclick="window.status='Panel 14';return true;"
  onmousedown="window.status='Panel 14';return true;"
  onmouseup="window.status='Panel 14';return true;"
  onmouseout="window.status='Panel 14';return true;"
  onmouseover="window.status='Panel 14';return true;"
  onmousemove="window.status='Panel 14';return true;">
<a href="javascript:newWindow('14.htm')">Panel 14</a>
</span>
<br>
<Span
  onclick="window.status='Panel 15';return true;"
  ondblclick="window.status='Panel 15';return true;"
  onmousedown="window.status='Panel 15';return true;"
  onmouseup="window.status='Panel 15';return true;"
  onmouseout="window.status='Panel 15';return true;"
  onmouseover="window.status='Panel 15';return true;"
  onmousemove="window.status='Panel 15';return true;">
<a href="javascript:newWindow('15.htm')">Panel 15</a>
</span>
</body>
</html>
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.