title: document.getElementById is returning null or undefined everytime
body: <p><strong>Javascript code is</strong> </p>
  
  <pre><code>function addConformationNo(){   
  
    var confirmationNo = document.getElementById("addedconfirmation").val();    
  
    alert(confirmationNo);
  
  }
  </code></pre>
  
  <p>and I'm calling <code>addConformationNo()</code> function on click of a button</p>
  
  <p>When the <code>addConformationNo()</code> function is executed, the function call to <code>document.getElementById</code> returns null everytime. Why? Any clues?</p>