The best way to disable javascript link shown in status bar?

H

howa

a traditional javascript usage such as

<a href="javascript:void(0)" onclick="xxx"....

or

<a href="javascript:doSomething()"

will both show the javascript link on the browser status bar...of
course you can use onmouseover to set the status bar text...but you
need to do on all the link....a little over kill....

anyway recommended mehod?
 
R

Randy Webb

howa said the following on 2/17/2007 11:16 AM:
a traditional javascript usage such as

<a href="javascript:void(0)" onclick="xxx"....

or

<a href="javascript:doSomething()"

will both show the javascript link on the browser status bar...

Then don't use a javascript: pseudo-protocol.
of course you can use onmouseover to set the status bar text...

Not really. Not anymore. Browsers are getting more and more offended by
authors changing the status bar text.
but you need to do on all the link....a little over kill....

You could do it with one loop in an onload of the body.
anyway recommended mehod?

<a href="someWhereUsefulForPeopleWithoutScripting.html"
onclick="xxx;return false;">

If all you want is the onclick of some text, use a button or a span and
use the onclick event of that element. End of problem.

Hack:

<a href="This is status bar text" onclick="someFunction();return false">

Want nothing in the status bar?

<a href="" onclick="someFunction();return false">Link with no status bar
text</a>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top