brodjah
05-18-2009, 03:52 PM
I am a newbe to web delevlopment.
I have the following form:
<form name="quantityconnect" method="get" action="http://www.doc.ic.ac.uk/~gu1/cgi-bin/formnew1.cgi ">
Quantity:
<select name="Quantity" size="1">
<option value="1">...1...</option>
<option value="2">...2...</option>
<option value="3">...3...</option>
<option value="4">...4...</option>
<option value="5">...5...</option>
<option value="6">...6...</option>
</select>
<input type="submit" value="Add to my basket">
</form>
What I want is for when the "Add to my basket" button is clicked, is for the value selected from the drop down box to be inputted into this table:
<table id="shoppingcart border="1">
<tr bgcolor="#ff0000">
<th align="center"><b>Item</b></th>
<th align="center"><b>Quantity</b></th>
<th align="center"><b>Price</b></th>
<th align="center"><b>Sum</b></th>
</tr>
<tr cellpadding="5">
<td><p><img src="20questionsbasket.jpg" alt="20questions" title="20 Questions">20 Questions Electronic Mind Reader</p></td>
<td>QUANTITY INSERTED HERE</td>
<td>9.77</td>
<td></td>
</tr>
<tr>
</table>
I have experimented many different ways unsuccessfully, and am now assuming i need to use some sort of javascript... Any1 have any code to help?
Thanks
Mike
I have the following form:
<form name="quantityconnect" method="get" action="http://www.doc.ic.ac.uk/~gu1/cgi-bin/formnew1.cgi ">
Quantity:
<select name="Quantity" size="1">
<option value="1">...1...</option>
<option value="2">...2...</option>
<option value="3">...3...</option>
<option value="4">...4...</option>
<option value="5">...5...</option>
<option value="6">...6...</option>
</select>
<input type="submit" value="Add to my basket">
</form>
What I want is for when the "Add to my basket" button is clicked, is for the value selected from the drop down box to be inputted into this table:
<table id="shoppingcart border="1">
<tr bgcolor="#ff0000">
<th align="center"><b>Item</b></th>
<th align="center"><b>Quantity</b></th>
<th align="center"><b>Price</b></th>
<th align="center"><b>Sum</b></th>
</tr>
<tr cellpadding="5">
<td><p><img src="20questionsbasket.jpg" alt="20questions" title="20 Questions">20 Questions Electronic Mind Reader</p></td>
<td>QUANTITY INSERTED HERE</td>
<td>9.77</td>
<td></td>
</tr>
<tr>
</table>
I have experimented many different ways unsuccessfully, and am now assuming i need to use some sort of javascript... Any1 have any code to help?
Thanks
Mike