Results 1 to 8 of 8

Thread: mouse cursor moves over an image

  1. #1
    Join Date
    Aug 2007
    Posts
    45
    Thanks
    27
    Thanked 0 Times in 0 Posts

    Default mouse cursor moves over an image

    I use frames for my webpage.
    When the mouse cursor moves over an image, the actual URL of that webpage appears.
    May I know what code to use so that the actual URL of that webpage will not appear when the mouse cursor moves over an image?
    Thank you.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    If you're trying to hide the URL from people, it's not hard to find. This won't be secure.

    You can probably just override the window.status value with javascript.

    There are a few other ways, such as using a javascript href, or # href with javascript onclick, but that would limit functionality to users with javascript enabled.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Aug 2007
    Posts
    45
    Thanks
    27
    Thanked 0 Times in 0 Posts

    Default

    Thanks a lot dir. Actually i did not specifically want to hide the URL.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    What did you specifically want to do?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Aug 2007
    Posts
    45
    Thanks
    27
    Thanked 0 Times in 0 Posts

    Default

    I notice that for other sites, when the cursor moves over the image, the URL did not appear. I wonder how I could achieve that?

    Many thanks in advance.

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by amyy View Post
    I notice that for other sites, when the cursor moves over the image, the URL did not appear. I wonder how I could achieve that?

    Many thanks in advance.
    I'm not really sure what you mean when you say:

    When the mouse cursor moves over an image, the actual URL of that webpage appears.
    That sounds to me as though you just need to add/remove/edit the title attribute of the image tag and/or set the alt attribute more appropriately. But you might be talking about a linked image, which could be different. Where does the URL appear? I'd also like to see an example to really know what you are talking about.

    Please post a link to the page on your site that contains the problematic code so we can check it out.


    Tell me what to do, and in what browser to do it, to see this URL, and where to look for it showing up.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    Jun 2007
    Posts
    543
    Thanks
    3
    Thanked 78 Times in 78 Posts
    Blog Entries
    1

    Default

    Use the alt attribute when you declare the picture.
    HTML Code:
    <img src="url" alt="text to show when mouse hovers over" />
    http://w3schools.com/html/html_images.asp
    [Jasme Library (Javascript Motion Effects)] My Site
    /\/\@§†ê® §©®¡þ† /\/\@|{ê®
    There are 10 kinds of people in the world, those that understand binary and those that don't.

  8. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by Master_script_maker View Post
    Use the alt attribute when you declare the picture.
    HTML Code:
    <img src="url" alt="text to show when mouse hovers over" />
    http://w3schools.com/html/html_images.asp
    If it is a tool tip sort of thing that is happening, title or alt is already set to the URL that the original poster wants to avoid showing, yes. If so, it was probably set by their editor automatically. Using the alt attribute will only fix that in IE, and only if the title attribute isn't already involved. But, it could be other things.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •