title: JavaScript getElementByName().value not working
body: <p>I want alert if no file is selected. But in this code When a file is selected. It Still show The alert. Please Tell me how to fix it.</p>
  
  <pre><code>&lt;script&gt;
  function null_upload()
  {
   var a = document.getElementsByName("upload_file").value;
   if(a == null)
   {
      alert('Please Select Min 1 File.');
      return false;
   }
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>Upload Form is</p>
  
  <pre><code>&lt;input type="file" name="upload_file"&gt;
  &lt;input type="image" src="img/upload.png"  id="upload_botton" title="Upload Image" name="submit" onclick="return null_upload()"/&gt;
  </code></pre>