title: how to hide the error message in javascript
body: <p>i have one file upload form field,here without select any file means i want to show error message,from this code it will be working fine after that i select anyone file means i want hide the error message ,i don't know how to do this???</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$("#horoscope_form").submit(function(e) {
    e.preventDefault();
    var filename = document.forms["myForm"]["Filename"].value;
    if (filename == null || filename == "") {
      $("#fileselect_error").show();
      return false;
    } else {
      var filename = document.getElementById("myFile").value;
      alert(filename);
      $("#fileselect_error").hide();
      return false;
    }
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;form method="post" enctype="multipart/form-data" class="form-horizontal" style="margin-top: 20px;" id="horoscope_form" name="myForm"&gt;
    &lt;div class="form-group"&gt;
      &lt;label class="control-label col-xs-3"&gt;File Upload&lt;/label&gt;
      &lt;div class="col-md-9"&gt;
        &lt;div class="fileupload fileupload-new" data-provides="fileupload"&gt;
          &lt;div class="input-append"&gt;
            &lt;div class="uneditable-input"&gt;
              &lt;span class="fileupload-preview"&gt;&lt;/span&gt;
            &lt;/div&gt;
            &lt;span class="btn btn-default btn-file" id="fileinput"&gt;
                                      &lt;span class="fileupload-exists"&gt;Change&lt;/span&gt;
            &lt;span class="fileupload-new"&gt;Select file&lt;/span&gt;
            &lt;input type="file" id="myFile" name="Filename"&gt;
            &lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="form-group"&gt;
      &lt;div class="col-md-offset-3 col-xs-5"&gt;
        &lt;span id="fileselect_error"&gt;&lt;strong &gt;Error!&lt;/strong&gt; Please select your file.&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="form-group"&gt;
      &lt;div class="col-xs-offset-3 col-md-12"&gt;
        &lt;button class="btn btn-primary" value="register" type="submit"&gt;Upload The Horoscope&lt;/button&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>