Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Aug 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation How can i show a field data(text) when i move mouse over a pic (like alt text of pic)

    hello
    How can i show a field data(text) when i move mouse over a pic (like alt text of pic)
    for example your credit pic is available in a page,now u move your mouse over the credit pic and it shows your credit (like alt text in a simple image)from the My Sql.
    (for example: field name in sql is is: kom )
    any thing like this :
    <img src="pic/me.gif" alt=" this section code is nedded " width="9" height="9">
    <img src="pic/me.gif" alt=" $read from kom " width="9" height="9">
    thanks

  • #2
    Regular Coder musher's Avatar
    Join Date
    Jan 2005
    Location
    Minnesota
    Posts
    203
    Thanks
    0
    Thanked 0 Times in 0 Posts
    this assumes that you have already gotten the record and it's stored in
    $MyRow

    Code:
     <img src="pic/me.gif" alt="<php echo $MyRow['kom']; ?>" width="9" height="9">
    Thanks
    Jim M

    "Lord, help me to become the person my dog thinks I am" - Dawn Ewing
    "If you must know. Yes, I do enjoy running after the dog sled when I fall off" - Me

    www.huskyzone.com -- Woodland Siberians

  • #3
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    For the record, the "alt" parameter of an <img> tag only shows up as hover text in IE. W3C specs are the "title" parameter should be used for hover text. The "alt" parameter is for displaying text should the img be broken for whatever reason.

    The reason I point this out is more modern W3C compliant browsers such as Firefox will not show "alt" text as hover text. IE does it wrong and sucks, basically. Bottom line, always include "alt" and "title" parameters on images.

  • #4
    Regular Coder musher's Avatar
    Join Date
    Jan 2005
    Location
    Minnesota
    Posts
    203
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Fumigator
    For the record, the "alt" parameter of an <img> tag only shows up as hover text in IE. W3C specs are the "title" parameter should be used for hover text. The "alt" parameter is for displaying text should the img be broken for whatever reason.

    The reason I point this out is more modern W3C compliant browsers such as Firefox will not show "alt" text as hover text. IE does it wrong and sucks, basically. Bottom line, always include "alt" and "title" parameters on images.
    Thanks good catch Fumigator, I should have put that in.
    Thanks
    Jim M

    "Lord, help me to become the person my dog thinks I am" - Dawn Ewing
    "If you must know. Yes, I do enjoy running after the dog sled when I fall off" - Me

    www.huskyzone.com -- Woodland Siberians


  •  

    Posting Permissions

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