I am having difficulty in simple program...
I have a simple html form from which i get 3 values as integers and then they are submitted to a JavaScript function using this line This is the function that i am using
<script language="javascript">
function Secured_Rescaled_Marks(form)
{
var address = form.total_marks.value;
window.alert(address);
//var secured = (rescale_marks/total_marks)*secured_marks;
//alert('secured');
}
</script>
and this is the form
<form>
<table cellpadding="3">
<tbody>
<tr>
<td bgcolor="#6699CC">
<b>Total Marks:</b>
<input name="text" name="total_marks" />
</td>
</tr>
</tbody>
</table>
</br>
<table cellpadding="3">
<tbody>
<tr>
<td bgcolor="#6699CC">
<b>Secured Marks:</b>
<input name="text" name="secured_marks">
</td>
</tr>
</tbody>
</table>
</br>
<table cellpadding="3">
<tbody>
<tr>
<td bgcolor="#6699CC">
<b> Rescale Marks:</b>
<input name="textarea" name="rescale_marks">
</td>
</tr>
</tbody>
</table>
</br>
<input type="button" onsubmit="return Secured_Rescaled_Marks(this);" name="order" value="Secured_Rescaled_Marks??"/>
<input type="reset" value="Reset">
</form>
I need to calculate such formula on form submission and alert the result....
var secured = (rescale_marks/total_marks)*secured_marks;
Any help will be appreciated...