...

View Full Version : <label for problem - not working with images



looka
12-15-2005, 06:53 AM
i would like to trigger the same link from few different places in a page.
so, i give an ID to that link <a href="go.htm" id="idgo">go, baby</a>
if a link is textual, then it is no problem:


but, what if i want to use an image to trigger that link?
<label for="idgo"><img src="pic.gif"></label> //this is not working:(

mark87
12-15-2005, 04:50 PM
I don't understand... to make an image a link you need it within anchor tags...

<a href="go.htm" id="idgo"><img src="pic.gif"></a>

Perhaps you could provide a link so we can understand the problem better.

circusbred
12-15-2005, 05:15 PM
Labels are for form elements only (<input>,<select>,...). Internet Explorer's behaivor is incorrect!

looka
12-15-2005, 11:35 PM
so it is firefox's...

my idea is simply, that if i have one link, i have to change one link. all others just refers to that link. like i'd call an javascript, just more compatible.

this is my link
<a href="mylink.htm" id="lnk">link</a>

and from few different places from the page i just refer to it with

<label for="lnk">llllll</label> -if i click that 'lllll' text, that link is executed.

or is it another tag, doing the same effect?

Pennimus
12-15-2005, 11:41 PM
I don't see what the point is, why not just duplicate the link normally?

rmedek
12-16-2005, 02:05 AM
this is my link
<a href="mylink.htm" id="lnk">link</a>

and from few different places from the page i just refer to it with

<label for="lnk">llllll</label> -if i click that 'lllll' text, that link is executed.

or is it another tag, doing the same effect?
You're thinking along the wrong lines… HTML is a mark-up language. <a> surrounds a link, <label> denotes a label on a form element. To assign a link as a type of variable you need to use some sort of scripting. If you want total browser compatibility, use PHP or some sort of server-side scripting.

looka
12-16-2005, 12:23 PM
okay... i give up:)

thnx!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum