title: How to pass a parameter from a php file to AJAX js file?
body: <p>I'm new to AJAX. Here's my problem:</p>
  
  <ol>
  <li><p>I am calling my <code>index.php</code> file with this code:</p>
  
  <pre><code> http://www.moodurian.com/wall/index.php?CourseId=36
  </code></pre></li>
  <li><p>My <code>index.php</code> file has this code:</p>
  
  <pre><code>&lt;script type="text/javascript" src="js/wall.js"&gt;
  </code></pre></li>
  <li><p>I have a file <code>wall.js</code> that contains this code portion:</p>
  
  <pre><code>$.ajax({type: "POST",
          url: "message_ajax.php?CID=36",
          data: dataString,
          ...
  </code></pre></li>
  </ol>
  
  <p>It calls the file <code>message_ajax.php</code> and passes to <code>message_ajax.php</code> the parameter named CID that has the value of 36.</p>
  
  <p>Now what I really want to do is <strong>not</strong> hard code the value <code>36</code> in the <code>wall.js</code> line that says:</p>
  
  <pre><code>url: "message_ajax.php?CID=36",
  </code></pre>
  
  <p><strong>Instead</strong>, I want the line to say this:</p>
  
  <pre><code>url: "message_ajax.php?CID=CourseId",
     ...
  </code></pre>
  
  <p>I tried it, but somehow my <code>message_ajax.php</code> doesn't receive the value <code>36</code> through that CID parameter.</p>
  
  <p>So what I want to do actually, is to have my <code>index.php</code> file pass the a value (in this example, <code>36</code>) to <code>wall.js</code>, and then have <code>wall.js</code> pass that same value (in my example, value <code>36</code>) to <code>message_ajax.php</code>. </p>
  
  <p>How do I do this?</p>