Welcome Guest, Not a member yet? Register   Sign In
JQuery Validation
#4

[eluser]xwero[/eluser]
To get all the values you would have to do something like
Code:
var post = '';
$('#formid input,select,textarea').each(function(){
   var name = $(this).attr('name');
   switch($(this).attr('type'))
   {
      case 'checkbox':
      case 'radio':
        post += name+'="'+$(':checked',this).val()+'"&';
        break;
      default:
        post += name+'="'+$(this).val()+'"&';
        break;
   }
  
});
post = post.substring(0,post.length-1);
// ajax
This is just off the top of my head but it should give you some idea on how to gather fields. I think you should take a look at the validation plugin code to see how they gather the field values.


Messages In This Thread
JQuery Validation - by El Forum - 11-26-2007, 05:55 AM
JQuery Validation - by El Forum - 11-26-2007, 09:18 AM
JQuery Validation - by El Forum - 11-26-2007, 09:46 AM
JQuery Validation - by El Forum - 11-26-2007, 10:05 AM
JQuery Validation - by El Forum - 11-26-2007, 10:46 AM
JQuery Validation - by El Forum - 11-26-2007, 11:07 AM
JQuery Validation - by El Forum - 11-26-2007, 01:15 PM
JQuery Validation - by El Forum - 11-27-2007, 02:23 AM
JQuery Validation - by El Forum - 11-27-2007, 02:41 AM
JQuery Validation - by El Forum - 11-27-2007, 04:14 AM
JQuery Validation - by El Forum - 11-27-2007, 04:22 AM
JQuery Validation - by El Forum - 11-27-2007, 04:36 AM
JQuery Validation - by El Forum - 11-27-2007, 04:55 AM
JQuery Validation - by El Forum - 11-27-2007, 09:32 AM
JQuery Validation - by El Forum - 11-27-2007, 09:59 AM
JQuery Validation - by El Forum - 11-28-2007, 04:33 AM
JQuery Validation - by El Forum - 11-28-2007, 04:48 AM
JQuery Validation - by El Forum - 11-28-2007, 04:49 AM
JQuery Validation - by El Forum - 11-28-2007, 04:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB