need to calculate 2 input fields and display in 3rd

Ekaros

New Member
I want to multiply the quantity by price and 'display' in total. Total needs to be named "amount" in order to transfer the total cost to the gateway. As you can see I'm trying to create a get around to be able to use quantity. All information here is for test purposes so isn't personal.\[code\]<script type="text/javascript">function totalprice() { var qty = document.getElementById("quantity").value; var price = 219999; var total = (qty * price); document.getElementById("tot").value = http://stackoverflow.com/questions/15893105/total;}</script><form action="https://gateway.charityclear.com/hosted/" method="post"> <input type="hidden" name="merchantID" value="http://stackoverflow.com/questions/15893105/0000992"><input type="hidden" name="countryCode" value="http://stackoverflow.com/questions/15893105/826"> <input type="hidden" name="currencyCode" value="http://stackoverflow.com/questions/15893105/826"> <table><tr><td>Full Name </td><td><input type="text" name="customerName" value=http://stackoverflow.com/questions/15893105/></td></tr><tr><td>Full Shipping Address <br>(including Country)<br>(must be same as billing address)</td><td><textarea rows="4" name="customerAddress" value=http://stackoverflow.com/questions/15893105/></textarea></td></tr><tr><td>Post Code </td><td><input type="text" name="customerPostCode" value=http://stackoverflow.com/questions/15893105/></td> </tr><tr><td>Email Address </td><td><input type="text" name="customerEmail" value=http://stackoverflow.com/questions/15893105/></td> </tr><tr><td>Phone Number <br>(required for delivery)</td><td><input type="text" name="customerPhone" value=http://stackoverflow.com/questions/15893105/></td></tr><input type="hidden" name="redirectURL" value="http://www.UKRobstep.com/order- successful.html"><tr><td></td></tr><tr><td><input type="hidden" name="orderRef" value="http://stackoverflow.com/questions/15893105/Colour">Colour</td><td><select name="orderRef"><option value="http://stackoverflow.com/questions/15893105/Select a Colour">Select a Colour<option value="http://stackoverflow.com/questions/15893105/Robin M1 in Black">Black<option value="http://stackoverflow.com/questions/15893105/Robin M1 in White"> White<option value="http://stackoverflow.com/questions/15893105/Robin M1 in Red"> Red<option value="http://stackoverflow.com/questions/15893105/Robin M1 in Yellow">Yellow<option value="http://stackoverflow.com/questions/15893105/Robin M1 in Silver/Grey"> Silver/Grey</select></td></tr><tr><td>Quantity</td><td><input type="text" name="quantity" id="quantity" class="field" value="http://stackoverflow.com/questions/15893105/1" /></td></tr><tr><td>Price Per Unit</td><td><input type="text" name="price" id="price" class="field" value="http://stackoverflow.com/questions/15893105/
 
Top