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()
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({
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: {
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() }
}
}
}
}
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
5 matches
Mail list logo