bazzano
09-20-2005, 09:58 AM
Hey guys i have the following validated html strict code and i wish make a function in java script that allows the user to click on an option value such as
"Gibson Flying V" then display its cost in the cost option list.
for example
product selection (Gibson Flying V)
Cost (400)
the cost should automatically change to whatever the user selects in terms of the product any idea's anyone.
<SELECT NAME="mylist">
<OPTION VALUE="m1">Canora Stratocaster
<OPTION VALUE="m2">Fender Stratocaster
<OPTION VALUE="m3">Guild Electric
<OPTION VALUE="m4">Gibson Flying V
<OPTION VALUE="m5">Monterey
</SELECT><br></td></tr>
<tr> <td align="left">Cost</td> <td align="left"><SELECT NAME="mylist">
<OPTION VALUE="m1">$500.00
<OPTION VALUE="m2">$1000.00
<OPTION VALUE="m3">$200.00
<OPTION VALUE="m4">$400.00
<OPTION VALUE="m5">$3000.00
</SELECT><br></td></tr>
<tr> <td align="left">Are there anymore items</td>
<td align="left"><input type="checkbox" value="Age" size="20">Yes/No</td></tr>
<tr> <td align="left">Method of Payment</td>
<td align="left"><input type="radio" value="Cash" name="pay" size="20">
Credit<input type="radio" value="Credit" name="pay"size="20">
Cheque<input type="radio" value="Direct Debit" name="pay"
size="20">
"Gibson Flying V" then display its cost in the cost option list.
for example
product selection (Gibson Flying V)
Cost (400)
the cost should automatically change to whatever the user selects in terms of the product any idea's anyone.
<SELECT NAME="mylist">
<OPTION VALUE="m1">Canora Stratocaster
<OPTION VALUE="m2">Fender Stratocaster
<OPTION VALUE="m3">Guild Electric
<OPTION VALUE="m4">Gibson Flying V
<OPTION VALUE="m5">Monterey
</SELECT><br></td></tr>
<tr> <td align="left">Cost</td> <td align="left"><SELECT NAME="mylist">
<OPTION VALUE="m1">$500.00
<OPTION VALUE="m2">$1000.00
<OPTION VALUE="m3">$200.00
<OPTION VALUE="m4">$400.00
<OPTION VALUE="m5">$3000.00
</SELECT><br></td></tr>
<tr> <td align="left">Are there anymore items</td>
<td align="left"><input type="checkbox" value="Age" size="20">Yes/No</td></tr>
<tr> <td align="left">Method of Payment</td>
<td align="left"><input type="radio" value="Cash" name="pay" size="20">
Credit<input type="radio" value="Credit" name="pay"size="20">
Cheque<input type="radio" value="Direct Debit" name="pay"
size="20">