Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Submit a hidden form without a submit button

yupongyupong Posts: 15Member
Hi all,

I am a newbie to java script, can you give me an advice on how to submit a hidden form without a submit button.

Is it a good way to use the form.submit() method to do so? What is the pros and cons by using this?

thx a lot.

ypc

Comments

  • StannyBoyStannyBoy Posts: 115Member
    The only problem with form.submit() is that it doesn't trigger the submit event, so any form validation you have will not work. However this is easily overcome by saying "if (myValidationThingy()) form.submit()"

    SB
    : Hi all,
    :
    : I am a newbie to java script, can you give me an advice on how to submit a hidden form without a submit button.
    :
    : Is it a good way to use the form.submit() method to do so? What is the pros and cons by using this?
    :
    : thx a lot.
    :
    : ypc
    :

Sign In or Register to comment.