Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clicking images and getting the underling html

Status
Not open for further replies.

joemomma

Programmer
Sep 25, 2002
4
US
Hello all.
I'm try to figure out how to go about clicking on an image and getting the underlining html.

I know that you can do it by higlighting an image and then using the selectRange() but thats not working as well as I expected.

Basically I just need to be able to click on an image to get the value, not highlight it.

Can anyone point me in the right direction?
I just don't even know how to go about wording that in a search engine!
 
something like this?

Code:
<img src="[URL unfurl="true"]http://www.tek-tips.com/images/partnerbtn120x60.gif"[/URL] alt="tek-tips" onclick="alert(this.alt);" />



*cLFlaVA
----------------------------
[tt]( <P> <B>)[sup]13[/sup] * (<P> <.</B>)[/tt]

[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
Ah, the catch is that I don't know what the image is until I catch it.

Basically what's going on is our site has a fairly simple custom html creator. so people can put images on the page.
When they do that, the image is stored but I don't have access to what the name is.

I got around this by highlighting the image and using getrange but that is not that great and in some cases, the images takes up the entire space so the user can't get around it to highlight it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top