title: $_POST value not getting set on $.ajax post
body: <p>I'm new to PHP and javascript and I've run into a problem where I need to edit values in an xml document that is read in. I have an HTML Select that has been dynamically created by PHP code. </p>
  
  <pre><code>function outputTableRow() {
  echo "&lt;tr&gt;";
      echo "&lt;td&gt;";
          echo "&lt;select onchange=\"ValueChange(this);\"&gt;";
              echo "&lt;option value=\"not value\" selected &gt;No selection&lt;/option&gt;";
              echo "&lt;option value=\"A\" &gt;A&lt;/option&gt;";
              echo "&lt;option value=\"B\" &gt;B&lt;/option&gt;";
              echo "&lt;option value=\"C\" &gt;C&lt;/option&gt;";
              echo "&lt;option value=\"D\" &gt;D&lt;/option&gt;";
          echo "&lt;/select&gt;";
      echo "&lt;/td&gt;";
  echo "&lt;/tr&gt;";
  }
  </code></pre>
  
  <p>The onchange event for the select then calls a javascript function that (as far as my understanding goes) performs an ajax request to the _POST of that same php document.</p>
  
  <pre><code>function ValueChange(obj)
  {
      var value = obj.value;
  
      $.ajax({
      type: "POST",
      url: "functions.php",
      data: "callFunction=UpdateValue"
      });
  }
  </code></pre>
  
  <p>From there I try to check the value set by the ajax request in _POST to call the appropriate function.</p>
  
  <pre><code>if(isset($_POST['callFunction'])){
      if($_POST['callFunction'] == 'UpdateValue'){
         UpdateValue();
      }
  }
  </code></pre>
  
  <p>And finally in the function I'm trying to get to, I'm trying to write a console log when that code is reached but it never get's there. In fact, the _POST is always empty.</p>
  
  <pre><code>function UpdateValue()
  {
     echo '&lt;script&gt;console.log("VALUE CHANGE")&lt;/script&gt;';
  }
  </code></pre>
  
  <p>Any help is much appreciated.</p>