title: why validate function invoke after page refresh and nothing happen on click
body: <pre><code>var asign = function(id){
  
   return document.getElementById(id) ;
   } ;
  
  var f_name = asign('fname').value ;
  
   var validate = function (a) {
  this.a = a ;
      if(!a){
          alert("Somthing is require");
      }  else if(a.length&lt;6){
          alert("characters should be minimum 6") ;
      }
  }  
  
  
   asign('submit').addEventListener('click',validate(f_name),false) ;
  </code></pre>
  
  <p>validate function invoke in page refresh and after click the button nothing happen validate function nothing happen </p>