title: show div when form file upload browse button is clicked or when a file is selected and input?
body: <p>i am trying to show a div only when the user selects and image by clicking the file upload browse button. can someone please show me where i am going wrong and how to get this to work, i am using this html code:</p>
  
  <pre><code>&lt;input type="file" name="pic" accept="image/*" onClick="showSubmit(this);"/&gt;
  </code></pre>
  
  <p>my js code:</p>
  
  <pre><code>&lt;script&gt;
    function showSubmit(submit) {
        document.getElementById("submit").style.display = submit.checked ? "block" : "none";
  
    }
  &lt;/script&gt;
  </code></pre>
  
  <p>my div html:</p>
  
  <pre><code>&lt;div id="submit"&gt;
  &lt;div id="content2"&gt;
  &lt;input type="submit" value="Submit"&gt;
   &lt;/form&gt; 
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>my div css:</p>
  
  <pre><code>#submit{
  display:none;
  }
  </code></pre>