Wrox Programmer Forums
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 26th, 2006, 05:34 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 347
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Adam H-W
Default Image as an alt tag

Is it possible to create a dynamically generated image as an alt tag rather than text?

many thanks

Adam

 
Old July 27th, 2006, 02:56 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

I assume what you are asking is if you can place a link to an image inside the ALT attribute, something like this:

img src="./some_image.jpg" alt="./some_other_image.jpg"

And the answer to that is no, the alt tag will not display the image, it will display the path as text.

"The one language all programmers understand is profanity."
 
Old July 27th, 2006, 03:14 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

The proper term for what you're asking is "tooltip", which is done with the title attribute, BTW, not the alt attribute. The alt attribute is intended to be content that appears in the absence of an image. The title attribute is intended to appear as tooltip text that pops up when you hover your mouse over an element (not limited to images).

Yes, it's possible with the use of JavaScript. No, it's not possible with HTML alone.

HTH!

Regards,
Rich

--
Author,
Beginning CSS: Cascading Style Sheets For Web Design
CSS Instant Results

http://www.catb.org/~esr/faqs/smart-questions.html
 
Old July 27th, 2006, 03:23 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You may also want to take a look at OverLib: http://www.bosrup.com/web/overlib/

Currently the site is down. Don't know why, and for how long, but it may come up again....

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004





Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML tag from C# or ASP.NET tag from javascript angshujit ASP.NET 2.0 Basics 3 February 16th, 2007 10:07 AM
Background Image problem in DIV tag. cumminsj CSS Cascading Style Sheets 6 September 15th, 2006 03:02 AM
Problem with input type image With Anchor tag vinkumrect Javascript How-To 1 July 21st, 2005 08:59 AM
alt crmpicco HTML Code Clinic 5 February 7th, 2005 06:57 AM
image tag Bob Burns ASP.NET 1.0 and 1.1 Basics 4 July 18th, 2004 03:27 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.