title: JavaScript function won't fire on button click
body: <p>I've just started teaching myself JavaScript and am doing some basic exercises. Right now I'm trying to make a function that takes in three values and prints out the largest. However, the function refuses to fire upon button click. I tried making a separate, very simple function just for debugging and it refuses to fire as well. I've written other practice functions in almost the exact same manner (they had two parameters as opposed to three) that work fine. Any insight would be greatly appreciated.</p>
  
  <pre><code>&lt;!DOCTYPE HTML&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;script type = "text/javascript"&gt;
  &lt;!--
  
  //Define a function Max() that takes three numbers as 
  //arguments and returns the largest of them.
  function Boo(){
      document.write("boo");
      alert("boo");
  }
  
  
  function Max(p1, p2, p3){
      document.write(p1+p2+p3);
      alert('BOO!')
  
      document.write(document.getElementById('value1').value);
  
      var max = Number(p1);
      v2 = Number(p2):
      v3 = Number(p3);    
  
      if (v2 &gt; max)
          max = v2;
      if (v3 &gt; max)
          max = v3;
  
      document.write(max);
  }
  --&gt;
  &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
  &lt;form&gt;
      &lt;input type="text" id="value1" name="value1"/&gt;&lt;br /&gt;
      &lt;input type="text" id="value2" name="value2"/&gt;&lt;br /&gt;
      &lt;input type="text" id="value3" name="value3"/&gt;&lt;br /&gt;
      &lt;input type = "button" 
      onclick="Boo()" 
      value = "Compare!"/&gt;
      &lt;!-- onclick="Max(document.getElementById('value1').value,
                   document.getElementById('value2').value,
                   document.getElementById('value3').value)" --&gt;
  &lt;/form&gt;
    &lt;/body&gt;
   &lt;/html&gt;
  </code></pre>