Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: form on submit two functions
10-02-2008, 05:42 AM #1
- Join Date
- Oct 2008
- Thanked 0 Times in 0 Posts
form on submit two functions
Hi, I´m 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.
I´m 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, 06:41 AM #2
- Join Date
- Mar 2007
- Thanked 2,223 Times in 2,210 Posts
- Blog Entries
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)