Results . . .
. . . with the following code:
•HTML head:
<script type="text/javascript">
/* <![CDATA[ */
function getlabelstring(){
document.eCart1_1_ATC_0<?php echo $row_rsdetail["ID"]; ?>.label.value = document.eCart1_1_ATC_0<?php echo $row_rsdetail["ID"]; ?>.listsize.options[document.eCart1_1_ATC_0<?php echo $row_rsdetail["ID"]; ?>.listsize.selectedIndex].text;
}
/* ]]> */
</script>
•HTML body:
<!--storing label string value in a hidden field in the Add to Cart form - this value is only updated onchange
-->
<input type="hidden" name="label" value="Select Size" >
<!--list/menu is called listsize and calls a js function called getlabelstring
-->
<select name="listsize" onchange="getlabelstring()">
<option selected="selected">Select Size</option>
<option value="20">Infant</option>
<option value="17">Child</option>
<option value="17">Youth</option>
</select>
•Add to Cart "Size" binding (default value):
<?php echo $_POST["eCart1_1_Size_Add"]; ?>
•Live Result:
The "Size" column is displayed correctly (Infant, Child, or Youth) but the "Price" column says "0" . . .
I'm thinking that a javascript term is used incorrectly?
TWF_Product_RevereDetail-002.php