How do you hide the link when mouse over?

liunx

Guest
Is there a way to hide the link, where it could say click here to view the item? I have it where it sayd the website and # for the link, but how would I set it up so all it would say was click her ein the status bar<!--content-->It's a bad idea to use "click here" for a link text. User's of Braille and audio browsers have trouble jumping around on a page and often call up a list of just the links on the page. (Ctrl-j in Opera) Link texts need to be unique and make sense out of context. <br />
<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.w3.org/" onmouseover="window.status=this.firstChild.data; return true" onmouseout="window.status=''; return true">W3C</a><!--content-->I'm not sure what you mean but you can do this:<br />
<br />
<html><head><title>Hi There</title><br />
<br />
<style type="text/css"><!--<br />
<br />
a.hello:link{visibility:visible;}<br />
a.hello:visited{visibility:visible;}<br />
a.hello:focus{visibility:hidden;}<br />
a.hello:hover{visibility:hidden;}<br />
<br />
--></style><br />
<br />
</head><body><br />
<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"#" class="hello" onmouseover="window.status='Click Here';return true;">Now you see me, soon you won't.</a><br />
<br />
</body></html><!--content-->Charles did exactly what I wanted it to do, but the problem here was it only showed the first like like that, now I dont know why. Also, the other links just say undefined.<br />
<br />
Lavalamp, what you did is good, but it still shows a link in the status bar. I just want to have it say text of my choice<!--content-->Originally posted by Baby Jai <br />
Charles did exactly what I wanted it to do, but the problem here was it only showed the first like like that, now I dont know why. Also, the other links just say undefined. I have absolutely no idea what you mean by that.<!--content-->Ok here you go:<br />
<br />
games ->would show games in status bar<br />
joes link ->would show undefined in status bar<br />
happy go lucky ->would show undefined in status bar<br />
<br />
thats what im saying. how do i get them all to say what it is, liek how the first one does?><!--content-->Use those same "onmouseover" and "onmouseout" handlers for each A element where you want the effect. If you have tried that and it doesn't work then you have done something wrong. Please post the URL.<!--content-->Whats wrong with it<br />
<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"/selling.html" onmouseover="window.status=this.firstChild.data; return true" onmouseout="window.status=''; return true"> Games Volume 1</a></strong><br><br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"/selling3.html" onmouseover="window.status=this.firstChild.data; return true" onmouseout="window.status=''; return true"><strong>Games 3CD Collection </strong></a><br><br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"/selling7.html" onmouseover="window.status=this.firstChild.data; return true" onmouseout="window.status=''; return true"><strong>Poker CD</strong></a><br><br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"/Item4reg.html" onmouseover="window.status=this.firstChild.data; return true" onmouseout="window.status=''; return true"><strong>CD</strong></a><br><!--content--><a href=http://www.webdeveloper.com/forum/archive/index.php/"/selling.html" onmouseover="window.status=this.firstChild.data; return true" onmouseout="window.status=''; return true"> Games Volume 1</a></strong><br> <br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"/selling3.html" onmouseover="window.status=this.firstChild.data; return true" onmouseout="window.status=''; return true"><strong>Games 3CD Collection </strong></a><br> <br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"/selling7.html" onmouseover="window.status=this.firstChild.data; return true" onmouseout="window.status=''; return true"><strong>Poker CD</strong></a><br> <br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"/Item4reg.html" onmouseover="window.status=this.firstChild.data; return true" onmouseout="window.status=''; return true"><strong>CD</strong></a><br><br />
<br />
<br />
I believe the text in above in bold should be changed to what you want to be shown in the status bar, and should be surrounded in single quotes.<br />
I'm fairly new at this, so correct me if I'm wrong. I tried the code out, and it worked for me.<!--content-->Originally posted by Paul Jr <br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"/selling.html" onmouseover="window.status=this.firstChild.data; return true" onmouseout="window.status=''; return true"> Games Volume 1</a></strong><br> <br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"/selling3.html" onmouseover="window.status=this.firstChild.data; return true" onmouseout="window.status=''; return true"><strong>Games 3CD Collection </strong></a><br> <br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"/selling7.html" onmouseover="window.status=this.firstChild.data; return true" onmouseout="window.status=''; return true"><strong>Poker CD</strong></a><br> <br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"/Item4reg.html" onmouseover="window.status=this.firstChild.data; return true" onmouseout="window.status=''; return true"><strong>CD</strong></a><br><br />
<br />
<br />
I believe the text in above in bold should be changed to what you want to be shown in the status bar, and should be surrounded in single quotes.<br />
I'm fairly new at this, so correct me if I'm wrong. I tried the code out, and it worked for me. <br />
<br />
No thats not true, the text in bold cannot be changed becuase then it creates and error on the page. The single quotes means nothing. It works great but the opther links besdies the first one say the description "undefined", thats not what I wnat it to say. I mean it will do, but there has to be something with the child data. I have no idea what it is, but I bet you 100% thats charles can fix it<!--content-->The method that I demonstrated above assumes that your A element only contains PCDATA. You have several options.<br />
<br />
1) Eliminate the STRONG elements or change the nesting so that the STRONG elements contain the A elements.<br />
<br />
2) Use the non-standard but nonetheless widely supported "innerText" property in place of "firstChild.data".<br />
<br />
3) Give up and assign a string to "window.status".<!--content-->if you take the strong elements away you could use some simple css to bold them or increase the font size. I assume from Charles' post that it would work then?<!--content-->wow charles! your the man, thanks very much. I just got rid of the strong. Thanks again.<!--content-->Originally posted by Baby Jai <br />
No thats not true, the text in bold cannot be changed becuase then it creates and error on the page. The single quotes means nothing. It works great but the opther links besdies the first one say the description "undefined", thats not what I wnat it to say. I mean it will do, but there has to be something with the child data. I have no idea what it is, but I bet you 100% thats charles can fix it <br />
<br />
<br />
The method I stated will work, and yes, the single quotes do matter. For, if your code looks like this (without the single quotes) :<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"/selling.html" onmouseover="window.status=Games; return true" onmouseout="window.status=''; return true"> Games Volume 1</a></strong><br><br />
You will throw an error. Therefore, the single quotes are needed.<br />
I tried the code myself, worked fine for me.<!--content-->
 
Back
Top