javascript will not calculate and input my results back into my form

User

New Member
Trying to pull information from my form input fields and calculate them using Javascript. Its not quite working in my favor. \[quote\] HTML CODE on default1.html\[/quote\]\[code\] <script type="text/javascript" src="http://stackoverflow.com/questions/14061184/multiplication.js" language="javascript"></script> <form> <table> <tr><!--Row 2--> <td class="tdSize7"><input class="input" name="name1" type="text"/></td> <td class="tdSize7"><input class="input" name="source1" type="text"/></td> <td class="tdSize8"><p>$</p></td> <td class="tdSize9"><input class="input" name="income1" type="text"/></td> <td class="tdSize8"><p>X12</p></td> <td class="tdSize8"><p>$</p></td> <td class="tdSize9"><input name="ann1" disabled="disabled"/></td> </tr> <td class="tdSize9"><input class="inputSize2" name="" type="button" value="http://stackoverflow.com/questions/14061184/Calculate" onclick="addme(this.form)"/></td> </table> </form> \[/code\]\[quote\] JAVASCRIPT CODE on multiplication.js \[/quote\]\[code\] function addme(form){ //Constant Variables const twelve = Number (12); const fourHun = Number (400); const fourHunEighty = Number (480); //Monthly Income 1 var income1 = Number(frm.income1.value); var val = income1 * twelve; frm.ann1.value = http://stackoverflow.com/questions/14061184/val;}\[/code\]My javascript will not calculate and input my results back into my form.
This is just a sample of my code. i am hoping this will tell you enough and help you. In helping me in fixing my problem.
 
Back
Top