开发者

Troubleshooting remote jquery plugin requests

开发者 https://www.devze.com 2023-03-19 14:37 出处:网络
I\'m trying to use the remote option to check an email and see if the entered one is currently in the database. Using the Remember the Milk example on the site I have my js function set up as follows:

I'm trying to use the remote option to check an email and see if the entered one is currently in the database. Using the Remember the Milk example on the site I have my js function set up as follows:

$(function() { 
    // validate signup form on keyup and submit 
    $("#registrationForm").validate({ 
        rules: { 
            firstname: "required", 
            lastname: "required", 
            password: { 
                required: true, 
                minlength: 5 
            }, 
            password_confirm: { 
                required: true, 
                minlength: 5, 
                equalTo: "#password" 
            }, 
            email: { 
                required: true, 
                email: true, 
                remote:  "byob/processors/checkEmail.php" 
            }
        }
   }); 
}); 

However nothing is happening. I thought that perhaps I had the path to the file wrong, but looking under the Network tab in the Chrome Inspector.. no call is being made to the php file; I expect that one should be, and I should at least be getting a 404.

If this document would not show up that way, please advise on some methods to try troubleshoot开发者_JS百科ing this, since without getting a response from the server it is very difficult!


Seems to work just fine for me..

Keep in mind that the validation for existence will happen after it passes the required (must be non-empty) check and the valid email check..

Make sure the input is named correctly as well..

demo at http://jsfiddle.net/gaby/XFpcN/1/

0

精彩评论

暂无评论...
验证码 换一张
取 消