Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

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

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

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();
stephenrodrics
New php-forum User
New php-forum User
 
Posts: 58
Joined: Thu Mar 14, 2013 6:10 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();
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 stephenrodrics » Tue Apr 30, 2013 5:11 am

yes you are correct it worked.

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


Return to PHP coding => General

Who is online

Users browsing this forum: Google [Bot] and 4 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.