title: jQuery - Ajax showing empty RESPONSE / Success: not triggered when used with WordPress posts and pages
body: <p>Any help would be appreciated.</p>
  
  <p>I have created a small script which works fine when used with simple php pages. Now I just tried to add this script to my WordPress posts and pages. So I used "exec-php" plugin to call the php script.</p>
  
  <p>Everything works fine. But when user fills the data and submits the form, the data actually gets submitted (I can see the posted variables in firebug), but the response is not displayed under the form when used with wordpress, where as it works fine when used with plain php pages.</p>
  
  <p>My jQuery code is like this:</p>
  
  <pre><code>var dataString = 'name=' + name + '&amp;country=' + country + '&amp;lang=' + language;
  
  $("#paypal-submit").click(function () {
  
      $.ajax({
          type: "POST",
          url: "get.php",
          data: dataString,
          dataType: 'html',
          success: function (gotresponse) {
              $('#response-id').html("&lt;div id='id-message'&gt;&lt;p&gt;Got Response&lt;/p&gt;&lt;/div&gt;");
              $('#id-message').html(gotresponse).fadeIn(1500, function () {
                  $('#id-message');
              });
              $('#name').attr('onchange', 'resetForm()');
              $('#country').attr('onchange', 'resetForm()');
          }
      });
  });
  </code></pre>
  
  <p>When I actually view the whole process in firebug, I can see that the data is actually posted to the server.</p>
  
  <pre><code>200 OK               2.03s
  </code></pre>
  
  <p><strong>But when I see the response tab in firebug console, it is empty. I think the success message is not getting triggered when used with WordPress.</strong></p>
  
  <p>I cant figure out what could be the problem? Can someone help me solve this?</p>
  
  <p><em>NOTE: The same script works fine when used as it is, but when used with WordPress the jQuery - Ajax success does not get triggered.</em></p>
  
  <p>1st Edit:</p>
  
  <p>I just included the error: in ajax function</p>
  
  <pre><code>error:function(x,e){
              if(x.status==0){
              alert('You are offline!!\n Please Check Your Network.');
              }else if(x.status==404){
              alert('Requested URL not found.');
              }else if(x.status==500){
              alert('Internel Server Error.');
              }else if(e=='parsererror'){
              alert('Error.\nParsing JSON Request failed.');
              }else if(e=='timeout'){
              alert('Request Time out.');
              }else {
              alert('Unknow Error.\n'+x.responseText);
              }
          }
  </code></pre>
  
  <p>Now when I submit the form I get the alert saing "You are offline!! Please Check Your Network." This error is getting triggered. So please help me now.</p>