title: Call javascript function from html
body: <p>I need to call a javascript function from html and it doesn't seem to be working. I click on the images and nothing happens. The variable "brushVar" doesn't seem to be changing. blue.png Is a small blue button, and blueN.png is a small blue button in a different shade of blue, etc...Any help is greatly appreciated</p>
  
  <pre><code>&lt;body&gt;
  
  &lt;script&gt;
  var brushVar;
  
  
  function blue() {
      brushVar = ("#000000");
      alert(brushVar);
  }
  
  function blueN() {
      brushVar = ("#000000");
      alert(brushVar);
  }
  
  function cyan() {
      brushVar = ("#000000");
      alert(brushVar);
  }
  
  function cyanN() {
      brushVar = ("#000000");
      alert(brushVar);
  }
  
  function green() {
      brushVar = ("#000000");
      alert(brushVar);
  }
  
  function greenN() {
      brushVar = ("#000000");
      alert(brushVar);
  }
  
  function purple() {
      brushVar = ("#000000");
      alert(brushVar);
  }
  
  function purpleN() {
      brushVar = ("#000000");
      alert(brushVar);
  }
  
  function red() {
      brushVar = ("000000");
      alert(brushVar);
  }
  
  function redN() {
      brushVar = ("000000");
      alert(brushVar);
  }
  
  function yellow() {
      brushVar = ("#000000");
      alert(brushVar);
  }
  
  function yellowN() {
      brushVar = ("#000000");
      alert(brushVar);
  }
  &lt;/script&gt;
  
  
  
  
  
  &lt;div id="buttons" style="position:absolute; width:100%; height:100%&gt;
   &lt;a href="#" onclick="blue()';" &gt;
      &lt;img src="/blue.png"/&gt;
  &lt;/a&gt;
  &lt;a href="#" onclick="blueN()';" &gt;
      &lt;img src="blueN.png"/&gt;
  &lt;/a&gt;
  &lt;a href="#" onclick="cyan()';" &gt;
      &lt;img src="cyan.png"/&gt;
  &lt;/a&gt;
  &lt;a href="#" onclick="cyanN()';" &gt;
      &lt;img src="cyanN.png"/&gt;
  &lt;/a&gt;
  &lt;a href="#" onclick="green()';" &gt;
      &lt;img src="green.png"/&gt;
  &lt;/a&gt;&lt;a href="#" onclick="greenN()';" &gt;
      &lt;img src="greenN.png"/&gt;
  &lt;/a&gt;
  &lt;a href="#" onclick="purple()';" &gt;
      &lt;img src="purple.png"/&gt;
  &lt;/a&gt;
  &lt;a href="#" onclick="purpleN()';" &gt;
      &lt;img src="purpleN.png"/&gt;
  &lt;/a&gt;
  &lt;a href="#" onclick="red()';" &gt;
      &lt;img src="red.png"/&gt;
  &lt;/a&gt;
  &lt;a href="#" onclick="redN()';" &gt;
      &lt;img src="redN.png"/&gt;
  &lt;/a&gt;
  &lt;a href="#" onclick="yellow()';" &gt;
      &lt;img src="yellow.png"/&gt;
  &lt;/a&gt;
  &lt;a href="#" onclick="yellowN()';" &gt;
      &lt;img src="yellowN.png"/&gt;
  &lt;/a&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>