Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Oct 2008
    Posts
    1
    Thanks
    0
    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
    Attached Files Attached Files

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,864
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •