This is a message.

Submit form on tab change Created Nov 30, 2010

This thread is solved

Views: 1184     Replies: 1     Last reply Nov 30, 2010  
You must login first before you can use this feature

redani

Posts: 39

Registered:
Aug 10, 2009

Submit form on tab change

Posted: Nov 30, 2010

Hello everybody,
my question is simple:
I'm using tabs for different forms: Contact information, Password, ...
the "contact information" tab is shown by default, and what i would like to do is to submit the form when we change the tab, but only if any change has been made in the first tab!!

i tried the onClick event but it submits the form on tab load... :(

Thanks for your help
Reda

redani

Posts: 39

Registered:
Aug 10, 2009

» Submit form on tab change

Posted: Nov 30, 2010

Reply to: Submit form on tab change, from redani
I almost found the solution but need to improve it:
$("ul.tabs").tabs("div.tabs-panes > div", {
effect: "fade"
}).click(function() {
$("#form-account").submit();
});
but i don't know how to blok changing the tab if there is an error in the form...

please help :((