title: Open File Browser on Link Click
body: <p>I'm trying to duplicate the photo upload script used on Facebook for changing your profile picture. I'm wanting for the user to click on a link and it automatically opens the file browser, and then when they click ok it submits the image.</p>
  
  <p>What I'm wanting to know is how do you trigger the file browser on clicking a link, and how do you trigger to submit it when they press ok?</p>
  
  <p>I already have a form, but want to make it more streamlined.</p>
  
  <p>Current script:</p>
  
  <pre><code>&lt;a href="#" data-reveal-id="changeImage"&gt;&lt;i class="fa fa-pencil"&gt;&lt;/i&gt; Edit Client Image&lt;/a&gt;
  &lt;div id="changeImage" class="reveal-modal"&gt;
  &lt;form action="view.php" enctype="multipart/form-data" method="post" name="imgForm" id="imgForm"&gt;
      &lt;input type="file" name="clientImage" id="clientImage" accept="image/*" /&gt;
      &lt;input name="doEditImg" type="submit" id="doEditImg" value="Save" /&gt;
  &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>