ID Value from a looped series of images

wxdqz

New Member
I am trying to find the write javascript for the following:

I have a form that loops through about 4-8 product images each of which has a product ID.

I simply need to know how to pass the ProductID variable once a product has been clicked. I am close, but can't quite get this, since this is once again just a little different than most routines.

It's the line onClick="this.ProductSelect.ProductID.value">
that I cannot figure out. I need to know how to set the form.value = ProductID statement

The smart ones here will know this right away:

<form name="ProductSelect" method="POST" action="catalog.php">

<table ...>
<tr>
<?php do { ?>
<td>
<input name="ProductID" type="image" value=http://www.webdeveloper.com/forum/archive/index.php/"0" src="<?php echo $xx['ImgSrc']; ?>"
<input name="ProductID" type="hidden" value=http://www.webdeveloper.com/forum/archive/index.php/"103" onClick="this.ProductSelect.ProductID.value">
</td>
<?php } while ($xx = mysql_fetch_assoc($xx)); ?>
</tr>
</table>
</form>
 
Back
Top