Beginner question: form submit

Discussion in 'Javascript' started by, Jun 6, 2005.

  1. Guest

    My form looks as follows. Why isn't the function Validate called when
    the function test is called? Thanks for your help!!

    function Validate()
    alert("in validate");

    function test()
    //do something
    <FORM method="POST" onsubmit="return Validate()">
    <input type=text value="xyz" onclick="test()">
    , Jun 6, 2005
    1. Advertisements

  2. LV_Indy

    LV_Indy Guest

    Because you aren't calling submit as a function:


    You are basically asking if submit exists, which is does. But you are
    doing nothing with it, so nothing's happening.
    LV_Indy, Jun 6, 2005
    1. Advertisements

  3. Guest

    The lack of paranetheses was my typo. Thanks for your reply.
    , Jun 6, 2005
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page