title: Php domain availability checker - Need an ajax code or similar to show result without reloading site
body: <p>I have a onepage site and I found this code for a domain checker, it works great but the problem is that when I submit the search it goes to the top of the page and I need to scroll back down to see the result. Can anyone help me so when I do the search it stays at the same place? I think ajax will do the job but I have not knowledge about it, and don't even know how to search for what I need.</p>
  
  <pre><code>&lt;div class="container"&gt;
      &lt;div class="row"&gt;
          &lt;div class="col-md-6"&gt;
          &lt;h3&gt;Check Domain Name Availability&lt;/h3&gt;
          &lt;form action="" method="GET"&gt;
              &lt;div id="custom-search-input"&gt;
                  &lt;div class="input-group col-md-24" &gt;
                      &lt;input type="text" name="domain" class="form-control input-lg" placeholder="Example.com or Example.in etc." /&gt;
          &lt;span class="input-group-btn"&gt;
                          &lt;button type="submit" class="glyphicon glyphicon-search"&gt;&lt;/button&gt;
  
  
                      &lt;/span&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/form&gt;
          &lt;?php
   error_reporting(0);
   if(isset($_GET['domain'])){
       $domain = $_GET['domain'];
       $godaddycheck = 'https://in.godaddy.com/domains/searchresults.aspx?checkAvail=1&amp;tmskey=&amp;domainToCheck='.$domain.'';
       $namecomcheck = 'https://www.name.com/domain/search/'.$domain.'';
       $registercomcheck = 'http://www.register.com/domain/search/wizard.rcmx?searchDomainName='.$domain.'&amp;searchPath=Default&amp;searchTlds=';
   if ( gethostbyname($domain) != $domain ) {
    echo "&lt;h1&gt;Already Registered!&lt;/h1&gt;";
   }
   else {
    echo "&lt;h3&gt;$domain&lt;/h3&gt;&lt;h2&gt;&lt;br&gt;Not Taken, you can register it.
    &lt;/h2&gt;";
   }
   }
  ?&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  </code></pre>