<A href problem in Tables, Help

liunx

Guest
Can somebody help<br />
<br />
Please Refer to The Bottom code for reference<br />
<br />
When I click on ADD the HTML does what I want it to do except it dose not use the cell data in the row I selected but the last row of the table. How Can I force the cell data in the row I have selected to be returned to the CGI Pgm.<br />
<br />
<br />
<br />
<!-- *** ADD CART ***--><br />
function add_cart (obj,index)<br />
{<br />
alert("got to add cart");<br />
var qindex = eval('document.Iform.Mfgqty_'+index);<br />
alert(qindex.value);<br />
<br />
window.open("/infcgilibp/isl550.pgm?mfgno=/%mfgnum%/&mfgdes=/%mfgdesc%/&mfgqty="+qindex.value,<br />
"Iform1", "scrollbars,status,top=10,left=70,height=500,width=760"); <br />
return;<br />
}<br />
<br />
<br />
<br />
<tr><br />
<td><FONT size="-1"><a name="/%Mfgx%/">/%Mfg%/</a></FONT></td> <br />
<td><FONT size="-1">/%Mfgdesc%/</FONT></td> <br />
<td><FONT size="-1">/%Mfgnum%/</FONT></td> <br />
<td><FONT size="-1">/%Mfgprice%/</FONT></td><br />
<td><FONT size="-1"><INPUT size="4" type="text" maxlength="4" name="/%Mfgqty%/"></FONT></td><br />
<td valign="middle" align="center"><FONT size="-1"><A href=http://www.webdeveloper.com/forum/archive/index.php/"javascript:add_cart(/%xxx%/);">Add</A></td><br />
</tr><!--content-->To make your life easier,I'd sauggest you added check boxes in all of hte rows,and select a check box for the line you want to add.<br />
<br />
that way you can find out the row and then get value from the table cell to pass it on to the add function.<!--content-->Do you have an example of the check boxes and how the data from the row that is checked mark.<br />
<br />
thanks <br />
<br />
Clyde<!--content-->
 
Back
Top