title: Alert message will show up after the submission
body: <p>My alert message pop ups before the loading/submission of a record, so if the user didn't input any data. It still pops up. What additional javascript function should I use for my alert box?</p>
  
  <p>Here's my code </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>function myFunction() {
      alert("Adding Succesful!");
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;label for="bName" class="control-label col-xs-4"&gt;&lt;p class="left"&gt;Brand Name&lt;/p&gt;&lt;/label&gt;
   &lt;input name="bName" class="form-control req" required/&gt; 
  
  &lt;button type="submit" class="btn btn-default bt"  onclick="myFunction()" style="align:right;"&gt;ADD&lt;/button&gt;</code></pre>
  </div>
  </div>
  </p>