title: JQuery/Ajax URL referencing
body: <p><code>actually, problem solved. I made a mistake putting mysql_real_escape() for the post value, so it was accessing the file, but nothing passed to database. Thanks for the help</code></p>
  
  <p>I have a problem of getting the url within .ajax() to refer to the correct folder</p>
  
  <p>In the root I have folders <code>/functions</code> and <code>/js</code></p>
  
  <p>My php page included a js file <code>/js/min/custom-ck.js</code></p>
  
  <p>Inside <code>custom-ck.js</code>, I have .ajax() to refer to php file named <code>updatebg.php</code> within <code>/functions</code> folder (<code>/functions/updatebg.php</code>)</p>
  
  <pre><code> $.ajax({
          url : '/functions/updatebg.php',
          type : 'POST',
          dataType : 'text',
          data : {
              'bg' : bg
          },
  </code></pre>
  
  <p>Can someone help me getting the absolute url right?
  Thanks a lot.</p>