Go Back   CodingForums.com > :: Server side development > PHP

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 08-23-2006, 05:19 PM   PM User | #1
okok
New to the CF scene

 
Join Date: Aug 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
okok is an unknown quantity at this point
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
okok is offline   Reply With Quote
Old 08-23-2006, 05:57 PM   PM User | #2
musher
Regular Coder

 
musher's Avatar
 
Join Date: Jan 2005
Location: Minnesota
Posts: 203
Thanks: 0
Thanked 0 Times in 0 Posts
musher is an unknown quantity at this point
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
musher is offline   Reply With Quote
Old 08-23-2006, 06:12 PM   PM User | #3
Fumigator
UE Antagonizer


 
Fumigator's Avatar
 
Join Date: Dec 2005
Location: Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
Posts: 7,686
Thanks: 42
Thanked 637 Times in 625 Posts
Fumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of light
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.
Fumigator is offline   Reply With Quote
Old 08-23-2006, 06:17 PM   PM User | #4
musher
Regular Coder

 
musher's Avatar
 
Join Date: Jan 2005
Location: Minnesota
Posts: 203
Thanks: 0
Thanked 0 Times in 0 Posts
musher is an unknown quantity at this point
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
musher 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 11:04 AM.


Advertisement
Log in to turn off these ads.