...

View Full Version : How can i show a field data(text) when i move mouse over a pic (like alt text of pic)



okok
08-23-2006, 06:19 PM
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

musher
08-23-2006, 06:57 PM
this assumes that you have already gotten the record and it's stored in
$MyRow


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

Fumigator
08-23-2006, 07:12 PM
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.

musher
08-23-2006, 07:17 PM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum