title: Javascript function like php POST
body: <p>I have an input form builded with Bootstrap. The check of correct data is handled by javascript, and it's set that on click of button "remind me" it pop ups a notification that says that everything is correct. This last part of pop up notification is handled by php POST method, and I want the same pop up to be shown but with javascript instead of <a href="/questions/tagged/php" class="post-tag" title="show questions tagged 'php'" rel="tag">php</a>.</p>
  
  <p>The HTML is:</p>
  
  <pre><code>    &lt;form class="form-horizontal" id="registerHere" method='post' action=''&gt;
    &lt;fieldset&gt;
      &lt;div class="control-group"&gt;
        &lt;div class="controls"&gt;
          &lt;input type="text" class="span3" id="user_name" name="user_name" rel="popover" data-content="Enter your first and last name." data-original-title="Full Name" placeholder="First name Last name"&gt;
  
        &lt;/div&gt;
  &lt;/div&gt;
  
   &lt;div class="control-group"&gt;
        &lt;div class="controls"&gt;
          &lt;input type="text" class="span3" id="user_email" name="user_email" rel="popover" data-content="What’s your email address?" data-original-title="Email" placeholder="me@somewhere.com"&gt;
  
        &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div class="control-group"&gt;
  &lt;div class="controls controls-row"&gt;
      &lt;input type="text" class="span1" id="inputPLZ" name="inputPLZ" placeholder="Postal" data-content="Insert your area postal code."&gt;
      &lt;input type="text" class="span2" id="inputOrt" name="inputOrt" placeholder="Place" data-content="Where are you from?"&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div class="control-group"&gt;
      &lt;label class="control-label" for="input01"&gt;&lt;/label&gt;
        &lt;div class="controls"&gt;
         &lt;button type="submit" class="btn btn-success" rel="tooltip" title="first tooltip"&gt;Remind me&lt;/button&gt;
  
        &lt;/div&gt;
  
  &lt;/div&gt;
  
  
  
    &lt;/fieldset&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>and the Javascript is</p>
  
  <pre><code>    &lt;script type="text/javascript"&gt;
    $(document).ready(function(){
          $('#registerHere input').hover(
              function(){
          $(this).popover('show')
              },
              function(){
          $(this).popover('hide') 
              }
          );
          $("#registerHere").validate({
              rules:{
                  user_name:"required",
                  user_email:{
                          required:true,
                          email: true
                      },
              },
              messages:{
                  user_name:"Enter your first and last name",
                  user_email:{
                      required:"Enter your email address",
                      email:"Enter valid email address"
                  },
              },
              errorClass: "help-inline",
              errorElement: "span",
              highlight:function(element, errorClass, validClass) {
                  $(element).parents('.control-group').addClass('error');
              },
              unhighlight: function(element, errorClass, validClass) {
                  $(element).parents('.control-group').removeClass('error');
                  $(element).parents('.control-group').addClass('success');
              }
          });
      });
    &lt;/script&gt;
  </code></pre>
  
  <p>this is PHP part that I wanna replace with Javascript:</p>
  
  <pre><code>        &lt;?php if($_POST) { ?&gt;
  &lt;div class="alert alert-success"&gt;
    Thanks, we have your info, and expect our contact really soon!
  &lt;/div&gt;
  &lt;?php } ?&gt;
  </code></pre>