views:

127

answers:

1
jQuery(document).ready(function(){
    jQuery('#frmSS1').submit(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.

A: 

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

naugtur
Browser don`t count this exception like error or warning. It just don`t call post() function.I tried propps as strings, but result is same.
Azilot
what's that `debugger;` line? and are You sure Your action attribute points to something? what works for forms may not work for ajax [eg. an empty string as action]
naugtur
debugger is keyword for FireBug or similar tools to stop js execution at this line. Like breakepoint.action string is ok - i have checked it more than twice.
Azilot