Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery JSON Response
    text
    copied!<p>I'm having problems with jQuery JSON Response.. I'm passing the information, and getting back the headers, but i don't get the HTML. I've been trying to solve this with JSONP too but still with no results.</p> <pre><code>&lt;script type='text/javascript'&gt; $(document).ready(function(){ $("input.senddata").click(function() { var ipForm = $('input[name="ip_submit"]').val(); var gameForm = $( 'select[name="game_submit"]' ).val() $.getJSON("http://gamepwn.net/serversdotee/add-server.php", { ip: ipForm, game: gameForm }, function(data) { $('#result').html(data); }); }); }); &lt;/script&gt; </code></pre> <p>the php file:</p> <pre><code>$data = array('items'=&gt;array('serverip'=&gt;'localhost', 'game'=&gt;'cs','protocol'=&gt;'48')); echo json_encode($data); </code></pre> <p>the headers im recieving:</p> <pre><code> Response Headers Cache-Control no-cache, must-revalidate Connection Keep-Alive Content-Type application/json Date Tue, 26 Jun 2012 21:49:01 GMT Expires Mon, 26 Jul 1997 05:00:00 GMT Keep-Alive timeout=5, max=100 Server Apache/2.2.19 (Unix) mod_ssl/2.2.19 OpenSSL/0.9.8e-fips-rhel5 DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_perl/2.0.4 Perl/v5.8.8 Transfer-Encoding chunked X-Powered-By PHP/5.3.6 Request Headers Accept application/json, text/javascript, */*; q=0.01 Accept-Encoding gzip, deflate Accept-Language et,et-ee;q=0.8,en-us;q=0.5,en;q=0.3 Connection keep-alive Host gamepwn.net Origin http://servers.kdfx.eu User-Agent Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20100101 Firefox/14.0 FirePHP/0.7.1 x-insight activate </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload