Solved

Suppress status bar message

Posted on 2002-04-18
33
588 Views
Last Modified: 2009-11-13
When I click on a link, how can I get it to not show the link in the status bar?
IE5+
0
Comment
Question by:kaller2
  • 12
  • 10
  • 5
  • +5
33 Comments
 
LVL 12

Expert Comment

by:lexxwern
ID: 6952494
<a href="..." onmouseover="window.status=''"  onmouseover="window.status=''">Link</a>
0
 
LVL 12

Expert Comment

by:lexxwern
ID: 6952495
But i dont think you should do that as it leaves your visitors handicapped. or atleast they get such feeling.
0
 
LVL 30

Expert Comment

by:third
ID: 6952496
i.e. when you mouse over but it will still show up when u click. try it!
0
 
LVL 12

Expert Comment

by:lexxwern
ID: 6952501
then onmousedown
0
 
LVL 12

Expert Comment

by:lexxwern
ID: 6952505
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
 
LVL 12

Expert Comment

by:lexxwern
ID: 6952509
<a href="..." onmouseover = "window.status=''"  onmouseout = "window.status=''" onmousedown = "window.status=''">Link</a>
0
 
LVL 30

Expert Comment

by:third
ID: 6952515
are you sure? have u tested it?
0
 
LVL 12

Expert Comment

by:lexxwern
ID: 6952523
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
 
LVL 2

Author Comment

by:kaller2
ID: 6952533

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
 
LVL 30

Accepted Solution

by:
third earned 200 total points
ID: 6952534
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
 
LVL 12

Expert Comment

by:lexxwern
ID: 6952536
<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
 
LVL 30

Expert Comment

by:third
ID: 6952541
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
 
LVL 2

Author Comment

by:kaller2
ID: 6952546
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
 
LVL 2

Author Comment

by:kaller2
ID: 6952555
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
 
LVL 12

Expert Comment

by:lexxwern
ID: 6952557
okay. i know. but kaller2 this is the closest you can get to what you want.

This is the most you can do...
0
 
LVL 2

Author Comment

by:kaller2
ID: 6952566
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 30

Expert Comment

by:third
ID: 6952577
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
 
LVL 12

Expert Comment

by:lexxwern
ID: 6952693
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
 

Expert Comment

by:jambo88
ID: 6952802
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
 
LVL 22

Expert Comment

by:CJ_S
ID: 6952967
<a href="What you wanna show" onClick="location='yournewpage.htm';return false;">Click here</a>
0
 
LVL 2

Author Comment

by:kaller2
ID: 6953022
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
 
LVL 12

Expert Comment

by:lexxwern
ID: 6955435
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
 
LVL 2

Author Comment

by:kaller2
ID: 6955560

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
 
LVL 7

Expert Comment

by:axis_img
ID: 6955723
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
 
LVL 2

Author Comment

by:kaller2
ID: 6955803
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
 
LVL 2

Author Comment

by:kaller2
ID: 6957497
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
 
LVL 2

Author Comment

by:kaller2
ID: 6962841
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
 
LVL 2

Author Comment

by:kaller2
ID: 6964388
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
 
LVL 1

Expert Comment

by:kiqkinas
ID: 8317387
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
 
LVL 2

Author Comment

by:kaller2
ID: 8317431
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
 
LVL 2

Author Comment

by:kaller2
ID: 8317434
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
 
LVL 1

Expert Comment

by:kiqkinas
ID: 8324379
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
 

Expert Comment

by:JABCreations
ID: 8616809
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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now