[thelist] Give an image a value
aardvark
roselli at earthlink.net
Fri Jun 8 10:40:59 CDT 2001
> From: "Kevin Stevens" <kjs at ratking.co.uk>
>
> Is it possible to give an image a value? What I am trying to do is
> have a group of thumbnails and when one is clicked I want to pass a
> value onto a database where the value corresponds to the primary key
> in the db. I have tried putting the image into form with a hidden
> input type but it won't pass the value, eg
>
> <form name="thumbform" method="post" action="photos.asp">
> <a href="photos.asp"><img src="images/piano.jpg" width="198"
> height="315" alt="" border="0"><input type="hidden"
> name="photothumbs1" value="1"></a> </form>
>
> Is this possible?
why not:
<a href="photos.asp?photothumbs1=1"><img
src="images/piano.jpg" width="198" height="315" alt=""
border="0"></a>
you don't need a form... just parse it out of the query string...
however, if you feel you need a form, replace the <img> tag with
this:
<input type="image" src="images/piano.jpg" width="198"
height="315" alt="" border="0">
More information about the thelist
mailing list