开发者

jQuery.post raises INVALID_STATE_ERR (11)

jQuery(document).ready(function(){
    jQuery('#frmSS1').subm开发者_JAVA技巧it(function(){
            debugger;
            jQuery.post(
               jQuery('#frmSS1').attr('action'),
               {
                   email : jQuery('#frmSS1 .email-input').val(),
                   format : jQuery('#frmSS1 .format-input').val(),
                   captcha : jQuery('#frmSS1 .captcha-input').val(),
                   submit : 'Complete Subscription Request'
               },
               function(response){
                   alert(response);
               },
               'html'
            );
        return false;
    });
});

jQuery.post() returns XmlHTTPRequest object. Status property is 0 under firefox and DomException object with code 11 under chrome. I tried to get all params not in post function - they are fine. I just jave no idea, why does it raises this exception.


interesting... :)

It's just a guess, but try proper keys as strings

{
      "email" : jQuery('#frmSS1 .email-input').val(),
      "format" : jQuery('#frmSS1 .format-input').val(),
      "captcha" : jQuery('#frmSS1 .captcha-input').val(),
      "submit" : 'Complete Subscription Request'
 }

and see if browser points to a line that is bad. It'd help guessing

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜