title: form open onclick button
body: <p>I have a form. In which I have fields SCHOLARSHIP FORM, PAYMENT, REGISTRATION NO. and ADMIT CARD. If i click on SCHOLARSHIP FORM, its <strong>fieldset</strong> should be open. If I click PAYMENT, its <strong>fieldset</strong> should be replace existing and payment's <strong>fieldset</strong> should be open inplace of existing. </p>
  
  <p>It is opening, but below old one. It is not replacing. </p>
  
  <pre><code>        &lt;form id="msform"&gt;
           &lt;!-- progressbar --&gt;
            &lt;ul id="progressbar"&gt;
            &lt;li class="active"&gt;&lt;a href = "#" onclick = "showForm1()"&gt;Scholarship Form&lt;/a&gt;&lt;/li&gt;
             &lt;li class="active"&gt;&lt;a href = "#" onclick = "showForm()"&gt;Paymen&lt;/a&gt;t&lt;/li&gt;
             &lt;li class="active"&gt;Registration No.&lt;/li&gt;
         &lt;li class="active"&gt;Admit Card&lt;/li&gt;
       &lt;/ul&gt;
       &lt;!-- fieldsets --&gt;
         &lt;fieldset id = "theform1" style="display:none"&gt;
        &lt;h2 class="fs-title"&gt;Scholarship Form&lt;/h2&gt;
        &lt;h3 class="fs-subtitle"&gt;Fill Your Details&lt;/h3&gt;
          &lt;input type="text" name="email" placeholder="Email" /&gt;
         &lt;input type="password" name="pass" placeholder="Password" /&gt;
         &lt;input type="password" name="cpass" placeholder="Confirm Password" /&gt;
  
        &lt;/fieldset&gt;
          &lt;script type = "text/javascript"&gt;
         function showForm1() {
          document.getElementById("theform1").style.display = "block";
        }
        &lt;/script&gt;
  
  
  
         &lt;fieldset id = "theform" style="display:none"&gt;
          &lt;h2 class="fs-title"&gt;Payment&lt;/h2&gt;
          &lt;h3 class="fs-subtitle"&gt;Pay scholarship fee&lt;/h3&gt;
            &lt;input type="text" name="twitter" placeholder="Twitter" /&gt;
            &lt;input type="text" name="facebook" placeholder="Facebook" /&gt;
            &lt;input type="text" name="gplus" placeholder="Google Plus" /&gt;
  
         &lt;/fieldset&gt;
         &lt;script type = "text/javascript"&gt;
           function showForm() {
              document.getElementById("theform").style.display = "block";
         }
            &lt;/script&gt;
  
  
  
  
  
           &lt;fieldset&gt;
         &lt;h2 class="fs-title"&gt;Registration Number&lt;/h2&gt;
         &lt;h3 class="fs-subtitle"&gt;Download or Print your Registration Number&lt;/h3&gt;
           &lt;input type="text" name="fname" placeholder="First Name" /&gt;
          &lt;input type="text" name="lname" placeholder="Last Name" /&gt;
            &lt;input type="text" name="phone" placeholder="Phone" /&gt;
               &lt;textarea name="address" placeholder="Address"&gt;&lt;/textarea&gt;
  
         &lt;/fieldset&gt;
  
  
  
  
          &lt;fieldset&gt;
       &lt;h2 class="fs-title"&gt;Admit Card&lt;/h2&gt;
            &lt;h3 class="fs-subtitle"&gt;Download or Print Your Admit Card&lt;/h3&gt;
  
                  &lt;input type="text" name="phone" placeholder="Phone" /&gt;
                    &lt;textarea name="address" placeholder="Address"&gt;&lt;/textarea&gt;
  
             &lt;/fieldset&gt;
      &lt;/form&gt;
  </code></pre>