title: $ not defined ajax request in javascript
body: <p>I am trying to send a php file some values using ajax but in the call for ajax I am getting the following error</p>
  
  <pre><code>Uncaught ReferenceError: $ is not defined 
  </code></pre>
  
  <p>at the beginning line for the ajax request as follows:</p>
  
  <pre><code>$.ajax({
    type: "POST",
    url: 'program3.php',
    data: {
      player1name: player1name.value,
      player2name: player2name.value,
      playtopoints: playtopoints.value,
      delay: delay.value,
      numgames: numgames.value,
      gamesplayed: gamesplayed.value,
      p1turn: p1turn.value,
      p2turn: p2turn.value,
      p1total: p1total.value,
      p2total: p2total.value
    },
    success: function (data) {
      rolling = data;
    }
  });            
  </code></pre>
  
  <p>I first thought that it might need the refrence to ajax so i added the following line before the javascript on the html page:</p>
  
  <pre><code>&lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>but i am still getting the erro can anyone offer any insight?</p>
  
  <p>Also i have the data variables all defined as follow:</p>
  
  <pre><code>var player1name = document.JForm.p1name.innerHTML;
  </code></pre>
  
  <p>is that the correct way to assign them?</p>