Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-24-2006, 04:30 AM   PM User | #1
KyuubiKahiera
New to the CF scene

 
Join Date: Sep 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
KyuubiKahiera is an unknown quantity at this point
Editing Status bar when mouseover link

like the title says, how do you edit what the status bar says when the crusor is over a link (basicaly like hiding the destination of the link - kinda ;D)
KyuubiKahiera is offline   Reply With Quote
Old 09-24-2006, 07:00 AM   PM User | #2
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
Why would you do this? Hiding the url from the user isn't a good idea. Besides it won't work in Opera and Firefox allows users to not allow it.
__________________
||||If you are getting paid to do a job, don't ask for help on it!||||
_Aerospace_Eng_ is offline   Reply With Quote
Old 09-24-2006, 04:21 PM   PM User | #3
theDragonsDen
New to the CF scene

 
Join Date: Sep 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
theDragonsDen is an unknown quantity at this point
Code:
<span style="cursor: hand" onclick="location.href=http://thedragonsden.us.to'" onmouseover="window.status='theDragonsDen'" onmouseout="window.status=''">Click Here to Visit theDragon'sDen</span>
theDragonsDen is offline   Reply With Quote
Old 09-24-2006, 09:08 PM   PM User | #4
KyuubiKahiera
New to the CF scene

 
Join Date: Sep 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
KyuubiKahiera is an unknown quantity at this point
Quote:
Originally Posted by theDragonsDen View Post
Code:
<span style="cursor: hand" onclick="location.href=http://thedragonsden.us.to'" onmouseover="window.status='theDragonsDen'" onmouseout="window.status=''">Click Here to Visit theDragon'sDen</span>
i tried this and it does show the edited statusbar but, when i click on the text, nothing happens
KyuubiKahiera is offline   Reply With Quote
Old 09-24-2006, 11:17 PM   PM User | #5
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,448
Thanks: 0
Thanked 496 Times in 488 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
Most browsers have the option to allow Javascript to update the status bar turned off. You can only update the status bar from Javascript where the person visiting your site has specifically turned on that option in their browser. They are u8nlikely to do that as that opens a number of security holes that can potentially result in their computer hard drive being trashed.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote
Old 09-25-2006, 02:14 AM   PM User | #6
Arbitrator
Senior Coder

 
Arbitrator's Avatar
 
Join Date: Mar 2006
Location: Splendora, Texas, United States of America
Posts: 2,887
Thanks: 5
Thanked 186 Times in 183 Posts
Arbitrator is on a distinguished road
Quote:
Originally Posted by _Aerospace_Eng_ View Post
Besides it won't work in Opera […].
Works fine for me in Opera 9.01. Of course, I may have tampered with the defaults and not remember having done so.

Quote:
Originally Posted by KyuubiKahiera View Post
i tried this and it does show the edited statusbar but, when i click on the text, nothing happens
That's because the Javascript is missing an apostrophe within the onclick attribute's value. It's also using an incorrect, proprietary value for the cursor property; hand should be pointer. Here's a corrected version of theDragonsDen's code:

Code:
CSS:
span {
  cursor: pointer;
  color: red;
  text-decoration: underline;
  }

HTML and inline JavaScript/:
<span onclick="location.href='http://thedragonsden.us.to/';"
      onmouseover="window.status='theDragon\u0027sDen';"
      onmouseout="window.status='';">Click Here to Visit theDragon'sDen</span>
Of course, I would advise using an anchor (a) element instead of a span element for the link so that you have a fall-back in case the user has JavaScript disabled:

Code:
<a href="http://thedragonsden.us.to/"
   onmouseover="window.status='theDragon\u0027sDen';"
   onmouseout="window.status='';">Click Here to Visit theDragon'sDen</a>
__________________
Please for the love of god stop making IE. You current "browser"s cause me to cry every day. —Phil *
Arbitrator is offline   Reply With Quote
Old 09-25-2006, 03:12 AM   PM User | #7
KyuubiKahiera
New to the CF scene

 
Join Date: Sep 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
KyuubiKahiera is an unknown quantity at this point
Quote:
Originally Posted by Arbitrator View Post
Code:
CSS:
span {
  cursor: pointer;
  color: red;
  text-decoration: underline;
  }

HTML and inline JavaScript/:
<span onclick="location.href='http://thedragonsden.us.to/';"
      onmouseover="window.status='theDragon\u0027sDen';"
      onmouseout="window.status='';">Click Here to Visit theDragon'sDen</span>
this shows what i want done but i just need the text to be underlined and blue (which i can do myself) but, it shows the wrong crusor image i want. how can it be the pointer/finger crusor image?
KyuubiKahiera is offline   Reply With Quote
Old 09-25-2006, 05:35 AM   PM User | #8
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
Just use the link code he gave you. It will get the finger cursor by default.
__________________
||||If you are getting paid to do a job, don't ask for help on it!||||
_Aerospace_Eng_ is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:31 AM.


Advertisement
Log in to turn off these ads.