title: Jquery Ajax url path Issue
body: <p>I am trying to design a message system for my website, but i can't get my ajax running.
  So I make a simpler version of the interaction between the files.</p>
  
  <p>Here is my file both test.php and load.php is under the root folder ( public_html).</p>
  
  <p>i have the ajax function in test.php. load.php is just simply echoing "wow".</p>
  
  <pre><code>$("#test").click(function(){
   alert("Clicked.");
  
   $.ajax({
       url:"/load.php",
       type:"POST",
       beforeSend: function(){
           alert("testing");   
       },
       success:function(result){
          $("#result").html(result);
          alert("  sss  "+result);
       }
   }).error(function(){alert("wrong");});
   });
  </code></pre>
  
  <p>Now It works perfectly.</p>
  
  <p><strong>...........how to set relative path  ...................</strong></p>
  
  <p>Here is the more complicated design</p>
  
  <p>3 files, all in different folder :  </p>
  
  <ol>
  <li>messages.php (under root)
  <ul>
  <li>showing all the messages</li>
  </ul></li>
  <li>control.php  (root/panels) 
  <ul>
  <li>a panel will be included in messages.php </li>
  </ul></li>
  <li>load.php     (root/functions)
  <ul>
  <li>control.php will use ajax to call it then display result in control.php</li>
  </ul></li>
  </ol>
  
  <p>so when user load in messages.php, it will load control.php then run the ajax call control.php.</p>
  
  <p>I am so confused about how to set up these paths for ajax<br>
  ( including control.php in messages.php works fine)</p>
  
  <p>Thanks</p>