[jQuery] Re: Validation and Tabs plugins compatibility

2008-07-08 Thread peace4theapes

Diego,

Thanks for the reply. I tried this idea but it threw up another
interesting problem. I was wondering if you could throw some light on
it.

When the validation plugin adds an error class, it does not remove it
once the form is validated. Therefore when I switch to the tab with
the error class, the same tab is selected every time.

Also, do you know how I could call this small (tab changing) function
from the validate plugin? Something like form.validate({onerror:
changetabs()}

Thanks again,
-P


[jQuery] Validation and Tabs plugins compatibility

2008-07-03 Thread peace4theapes

Hello all,

I am just switching to JQuery from prototype and am trying to use the
Validation and Tabs plugins for JQuery. Here's my problem:

I have one form tag in which I have my tabs container. Using a dynamic
language I am creating multiple tabs for user chosen data, say states.
So if the user has chosen 5 states, there are five tabs with the same
form fields with the "_statename" appended to the end of the field
name.

So, if the user enters data, validates the form and click on continue
nothing happens as the user has not touched the other tabs. But, the
user doesn't know about this and it is a confusion. Is there a way to
select the right tab depending on which tab the validator throws an
error in?

Any help would be greatly appreciated.

I am using the following code:




 $(function() {

 $('##tabs_container > ul').tabs({ fx: { opacity:
'toggle' } });
 });
 



$().ready(function() {

$("##general").validate({
rules: {


products_#sta#: "required"
osda_#sta#: "required",


},
messages: {


products_#sta#: "Choose product";
osda_#sta#: " Please choose YES OR NO."


}
});


});




Thanks
-P