jQuery: $.post not working, $.get works
<p>Firstly, I did look at related posts, but none of them quite stoops down to my stupidity levels. Its my first time working with web technologies and I'm trying to work with Ajax/JQuery and Django.
Here is the code:</p>

<pre><code>$(document).ready(function() {                                                
    $('#result').ajaxError(function() {                                       
       $(this).text('Triggered ajaxError handler.');                           
    });                                                                       
    $('#b').click( function() {                                               
        codes = $('#code').text();                                            
        $.get("/questions/compile",                                           
            function(data){                                                   
                alert("data saved" + data);                                      
            });                                                                   
    });                                                                       
});       
</code></pre>

<p>Now this code works fine and I get a alert box as expected. But when I change $.get to $.post, I get ajaxerror. I did try using $.ajax with appropriate values, but get same problem as $.post . Firing up Firebug, shows an error at line 5252 in jquery.js. That line is </p>

<pre><code>xhr.send( type === "POST" || type === "PUT" || type === "DELETE" ? s.data : null );
</code></pre>

<p>I'm not sure how to debug any further. And since I'm not sending any data, $.post should work just as well as $.get. Now go ahead and point out my stupidity. Cheers.</p>
