title: Javascript calculator not working.
body: <p>I created this javascript calculator a little while ago. It worked perfectly for me for ages, but after going back to it I have discovered that it simple doesn't work at all anymore. </p>
  
  <p>Here is my js fiddle... <a href="http://jsfiddle.net/AdamMartin121/XXFXv/" rel="nofollow">http://jsfiddle.net/AdamMartin121/XXFXv/</a></p>
  
  <p>This is the code I used. It's very long and probably unnecessary. Does anyone know firstly why it's not working, and secondly a more efficient way of doing this?</p>
  
  <pre><code>Javascript Code...
  
      var display = document.getElementById("display"); 
  
  document.addEventListener("DOMContentLoaded", init, false);
  
  
  function init() {
  
  var name = prompt("Enter your name", "");
      if (name == null)
      {
  document.getElementById("head").innerHTML="Enter a name!";      
  }    
  else 
  {
      document.getElementById("head").innerHTML= "&lt;p&gt;Welcome, " +name+ ". &lt;/p&gt; &lt;p2&gt; This is a simple Javascript calculator. It is open source and was designed to help people to learn Javascript. &lt;br&gt; Feel free to copy and paste the code, and use it how you wish. &lt;/p&gt;";
   }
   document.getElementById("calc").display.style.block;
   }
  function naught() {
  var display= document.getElementById("display");    
      display.value+="0";
      }
  function one() {
      var display= document.getElementById("display");
      display.value+="1"
      }
  function two() {    
      var display= document.getElementById("display");
      display.value+= "2";
      }
  function three() {
      var display= document.getElementById("display");
      display.value+="3";
      }
  function four() {
      var display= document.getElementById("display");
      display.value+="4";
      }
  function five() {
      var display= document.getElementById("display");
      display.value+="5";
      }
  function six() {
      var display= document.getElementById("display");
      display.value+="6";
      }
  function seven() {
      var display= document.getElementById("display");
      display.value+="7";
      }
  function eight() {
      var display= document.getElementById("display");
      display.value+="8";
      }
  function nine() {
      var display= document.getElementById("display");
      display.value+="9";
  }
  function add() {
      var display= document.getElementById("display");
      display.value+="+";
  }
  function take() {
      var display= document.getElementById("display");
      display.value+="-";
  }
  function times() {
      var display= document.getElementById("display");
      display.value+="*";
  }
  function divi() {
      var display= document.getElementById("display");
      display.value+="/";
  }
  function equal() {
      var display= document.getElementById("display");
          display.value= eval(display.value);
  }
  </code></pre>
  
  <p>Thanks in advance.</p>