All,
I have the following code:
Here is the calculate function:Code:<form name="calculate" id="calculate" method="post" action=""> <table width="539" border="1" cellspacing="5" cellpadding="5"> <tr> <td width="65">One:</td> <td width="433"><input type="text" name="one" /></td> </tr> <tr> <td>Two:</td> <td><input type="text" name="two" /></td> </tr> <tr> <td>Total:</td> <td><input type="text" name="total" /></td> </tr> <tr> <td> </td> <td><input type="submit" name="Submit" value="Calculate Savings" onClick="calculatenow(this.calculate);"/></td> </tr> </table> </form>
It's not showing me the alert. I'm just trying to get that part to show it works. However, what I'm trying to do is add up the values in one and two and the based on adding those two up and then placing that total in the total field. Any ideas on how to do this?Code:<script language="text/javascript"> function calculatenow(obj){ alert('it works'); } </script>
Thanks in advance.


Reply With Quote
Bookmarks