Submit a hidden form without a submit button - Programmers Heaven

Howdy, Stranger!

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

Categories

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.