jQuery $.post callback function calling location.reload() without using an anonymous function
<p>Consider the following:</p>

<p>wrap callback in anonymous function (works)</p>

<pre><code>$('#updateView').change(function(e) {
  $.post(URL + "actions/updateView.php",
    { view: $(this).val() },
    function() {reloadPage();}
  );
});
</code></pre>

<p>call function directly (cookie is set but doesn't seem to update before page reload)</p>

<pre><code>$('#updateView').change(function(e) {
  $.post(URL + "actions/updateView.php",
    { view: $(this).val() },
    reloadPage()
  );
});
</code></pre>

<p>For what i am doing the first works but the second doesn't. the function reloadPage (shown below) reloads the page after updateView.php updates a cookie. For some reason using the second version the cookie isn't getting set before the page is reloading. but if i refresh the page my self, it "finds" the new value for the cookie.</p>

<p>is there something in the jQuery docs about this? I couldn't find anything.</p>

<pre><code>function reloadPage() {location.reload(true);}
</code></pre>

<p>I am using jQuery 1.4.1, Php 5.2.5, Apache 2.2.11</p>
