terrid25
terrid25

Reputation: 1946

submitting a form without hitting submit

I have a page, with a form that has hidden fields.

What I'm looking to do, is when the user hits the page, they get a 'Redirecting you....' and then the form is then submitted.

Can this be done using jQuery/PHP?

Thanks

Upvotes: 0

Views: 123

Answers (2)

Raoul
Raoul

Reputation: 3909

To simply submit the form:

 $('#FormID').submit();

If you want to do other UI stuff while the form is being submitted look at using AJAX to submit the form and update the UI.

http://api.jquery.com/jQuery.ajax/

Upvotes: 1

Ankur
Ankur

Reputation: 33657

getElementById("frmID").submit();

Upvotes: 1

Related Questions