I am trying to learn javascript via Tutorials online and have run into a problem I can’t seem to resolve. I have a form in my HTML Code that has two variables – item_number is originally set to ” ” and amount is set to “0”. A third variable is os0, and want to create a FUNCTION that can be accessed to seperate os0 at the “$” and put the first part in item_number and the last into amount – – CAN’T SEEM TO GET MY CODING TO WORK
The HTML Code is
<form action=”_blank”>
<input type=”hidden” name=”bn” value=”AMPPFPWZ.200″>
<input type=”hidden” name=”cmd” value=”
<input type=”hidden” name=”add” value=”1″>
<input type=”hidden” name=”currency_code” value=”USD”>
<input type=”hidden” name=”no_note” value=”1″>
<input type=”hidden” name=”image_url” value=””>
<input type=”hidden” name=”no_shipping” value=”0″>
<input type=”hidden” name=”undefined_quantity” value=”0″>
<input type=”hidden” name=”amount” value=”0″>
<input type=”hidden” name=”item_number” value=” “>
<!–webbot bot=”Include” U-Include=”../includes/paypal_email.htm” TAG=”BODY” –><tr>
<td class=’product_field’ nowrap>Product Name:</td>
<td>
<input readonly class=’product_attribute’ type=”text” name=”item_name” value=”Product Test” width=20 size=”18″></td>
<td align=right nowrap>
<!–webbot bot=”Include” U-Include=”../includes/cart_buttons.htm” TAG=”BODY” –></td>
</tr>
<tr>
<td><input type=”hidden” name=”on0″ value=”Model”><b>Model</b></td>
<td>
<select name=”os0″ size=”1″>
<option value=”Item 1 $50.00″>Item 1 $50.00
<option value=”Item 2 $75.00″>Item 2 $75.00
</select>
<!– NEED TO INCLUDE SCRIPT FUNCTION HERE –>
</td>
</tr>
<tr>
<td class=’product_field’>Product Description:</td>
<td colspan=2 class=’product_description’>Test
Product</td>
</tr>
</form>