Can we submit a form from Javascript Function by this.form

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

stephenrodrics
New php-forum User
New php-forum User
Posts: 60
Joined: Thu Mar 14, 2013 6:10 am

Can we submit a form from Javascript Function by this.form

Postby stephenrodrics » Mon Apr 29, 2013 7:49 am

Can we submit or post a form from within Javascript Function by doing

this.form.Submit();

HussainMHB
New php-forum User
New php-forum User
Posts: 10
Joined: Sat Apr 13, 2013 2:53 am

Re: Can we submit a form from Javascript Function by this.fo

Postby HussainMHB » Mon Apr 29, 2013 7:05 pm

It'd be better if you do something like this.
Document.forms['form1'].submit();

stephenrodrics
New php-forum User
New php-forum User
Posts: 60
Joined: Thu Mar 14, 2013 6:10 am

Re: Can we submit a form from Javascript Function by this.fo

Postby stephenrodrics » Tue Apr 30, 2013 5:11 am

yes you are correct it worked.

thanks


Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 2 guests