[jQuery] Re: remote validation with additional parameter

2008-11-27 Thread Jörn Zaefferer
Thats test code, nothing useful for an application. The code I posted is what you'll want to use: $(#myform).validate({ rules: { username: { required: true, remote: { url: checkusername.php, type: post data: { email: function() { return $(#email).val()

[jQuery] Re: remote validation with additional parameter

2008-11-27 Thread hcvitto
hi i just needed that option today!! for the moment i just found a not-very-good way out which works for me. Among the pages you suggested i found this: test(remote, customized ajax options, function() { expect(2); stop(); var v = $(#userForm).validate({

[jQuery] Re: remote validation with additional parameter

2008-11-27 Thread hcvitto
Wow..Jörn you're just great!! Thanks a lot! It works in chrome, firefox and ie6... On 27 Nov, 13:16, Jörn Zaefferer [EMAIL PROTECTED] wrote: Thats test code, nothing useful for an application. The code I posted is what you'll want to use: $(#myform).validate({  rules: {    username: {  

[jQuery] Re: remote validation with additional parameter

2008-11-25 Thread Jörn Zaefferer
With the 1.5 release you will be able to use this instead: $(#myform).validate({ rules: { username: { required: true, remote: { url: checkusername.php, type: post data: { email: function() { return $(#email).val() } } } } }

[jQuery] Re: remote validation with additional parameter

2008-11-20 Thread Jörn Zaefferer
The current workaround I recommend is to use ajaxSend: $().ajaxSend(function(e, xml, settings) { $.extend(settings.data, { field2: $(#field2).val() }); }); With the drawback that it gets applied to all ajax requests. Depends on your application if thats a problem and how to avoid it. Jörn On