View Full Version : form on submit two functions

10-02-2008, 06:42 AM
Hi, Im new to this forum. I hope that I can find help here.

Attached is a zip file with my code. Sorry, html text and comments are in spanish.

Im trying to create this calculator witch is basically a form that when submit, result will appear at the bottom inside a div witch is currently hidden with css.

I have set the onsubmit event equal to a function that validates the form fields. This first function is based on one I learn at lynda.com

If the first function returns true, it means that all fields are ok. But the browser window refresh and clears all the values. i think that at this point is my problem.

A second function is supposed to do a calculation based on the fields values and reveal a hidden div for the answer.

After that I need to return false, so the window dose not refresh.

Please take a look at my code

10-02-2008, 07:41 AM
"how to call two functions in onsubmit (http://www.google.com/search?q=how+to+call+two+functions+in+onsubmit)" :)