N
Nick Calladine
hi
I am trying to work out if i can read a value from a dropdown box to
caculate a running total on selection of a form
I using romancart as way to get the data to the form but wish to have a
simple total on screen so when user change the option / upgrade it displays
the value on screen before posting the form
i have done very little javascript so pls if you could explain or least show
some rough code example that would be appreciated
here my code so far
<SCRIPT LANGUAGE="JavaScript">
function alerter() {
alert(itemname3)
}
<form action=http://www.romancart.com/cart.asp name="myform">
<input type=hidden name=displaycart value=no>
<input type=hidden name=storeid value=10000>
<select name=itemname3 size="1"
onchange="alerter(document.myform.itemname3)">
<option value="2800 {10.00}">2800 AMD 64</option>
<option value="3000 {20.00}">3000 AMD 64</option>
<option value="3200 {30.00}">3200 AMD 64</option>
<option value="3400 {40.00}">3400 AMD 64</option>
<option value="3700 {50.00}">3700 AMD 64</option>
</select>
i understand i would need to parse the value to get the number inside the
curly brackets but i really not too sure of what i am doing.
can someone give me some ideas of where i going wrong ...
thanks
I am trying to work out if i can read a value from a dropdown box to
caculate a running total on selection of a form
I using romancart as way to get the data to the form but wish to have a
simple total on screen so when user change the option / upgrade it displays
the value on screen before posting the form
i have done very little javascript so pls if you could explain or least show
some rough code example that would be appreciated
here my code so far
<SCRIPT LANGUAGE="JavaScript">
function alerter() {
alert(itemname3)
}
<form action=http://www.romancart.com/cart.asp name="myform">
<input type=hidden name=displaycart value=no>
<input type=hidden name=storeid value=10000>
<select name=itemname3 size="1"
onchange="alerter(document.myform.itemname3)">
<option value="2800 {10.00}">2800 AMD 64</option>
<option value="3000 {20.00}">3000 AMD 64</option>
<option value="3200 {30.00}">3200 AMD 64</option>
<option value="3400 {40.00}">3400 AMD 64</option>
<option value="3700 {50.00}">3700 AMD 64</option>
</select>
i understand i would need to parse the value to get the number inside the
curly brackets but i really not too sure of what i am doing.
can someone give me some ideas of where i going wrong ...
thanks