Web Analytics Made Easy -
StatCounter Editing Status bar when mouseover link - CodingForum

Announcement

Collapse
No announcement yet.

Editing Status bar when mouseover link

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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)

  • #2
    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!||||

    Comment


    • #3
      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>
      www.theDragonsDen.us.to
      .:theDragon'sDen:: Entertainment Archives :.
      .: Pics :: Flash Games :: Video Clips :: Animations:.
      & More all for FREE

      Comment


      • #4
        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

        Comment


        • #5
          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/

          Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

          Comment


          • #6
            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.

            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:
            [FONT=Verdana][B]CSS:[/B][/FONT]
            span {
              cursor: pointer;
              color: red;
              text-decoration: underline;
              }
            
            [FONT=Verdana][B]HTML and inline JavaScript/:[/B][/FONT]
            <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>

            Comment


            • #7
              Originally posted by Arbitrator View Post
              Code:
              [FONT=Verdana][B]CSS:[/B][/FONT]
              span {
                cursor: pointer;
                color: red;
                text-decoration: underline;
                }
              
              [FONT=Verdana][B]HTML and inline JavaScript/:[/B][/FONT]
              <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?

              Comment


              • #8
                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!||||

                Comment

                Working...
                X