title: Send ajax request to a file inside Jquery Dialog
body: <p>I am trying to send an ajax request to a page that is loaded inside the Jquery Dialog box.
  This is my dialog box code:</p>
  
  <pre><code>$('#dialog').dialog({
          modal: false,
          open: function ()
          {
              $(this).load('window.php');
          },         
          height: 240,
          width: 400,
          title: 'Ajax Page'
      });
  </code></pre>
  
  <p>Now i have a link in my page, that sends ajax request to the "window.php" page, on click:</p>
  
  <pre><code> $.post("window.php", { username: username }
  </code></pre>
  
  <p>And in the loaded page (window.php), i put the code to print the post parameters... </p>
  
  <pre><code>&lt;?php
  echo 'Hello world';
  var_dump($_POST);
  if(isset($_POST['username']))
  {
  echo ':: '.$_POST['username'];
  }
  ?&gt;
  </code></pre>
  
  <p>But to my surprise, i am not getting any request parameters printed in the loaded page of dialog box. I am just getting <code>Hello world</code>. What could be the issue?</p>