title: how to open popup on form submit in php using jquery or javascript
body: <p>I am trying to open a popup on submit button of a contact form below is the code</p>
  
  <pre><code>&lt;form id="contact" name="contact" method="post" action="mail2.php" onsubmit="return valid();"&gt;
              &lt;label&gt;Name :&lt;/label&gt;
                  &lt;input name="name" type="text" id="name" class="contact-input-box" /&gt;
  
              &lt;label&gt;Contact No. :&lt;/label&gt;
                  &lt;input name="telephone" type="text" id="telephone" class="contact-input-box" /&gt;
  
              &lt;label&gt;Email :&lt;/label&gt;
                  &lt;input name="email" type="text" id="email" class="contact-input-box" /&gt;&lt;br class="clearBoth" /&gt;  
  
              &lt;label&gt;Gender :&lt;/label&gt;
              &lt;span&gt;Mail&lt;/span&gt; &lt;input type="radio" name="gender" value="male"&gt;
              &lt;span&gt;Femail&lt;/span&gt; &lt;input type="radio" name="gender" value="female" /&gt; &lt;br class="clearBoth" /&gt;
  
              &lt;label&gt;product :&lt;/label&gt;
              &lt;select name="product" class="dropdown" id="product"&gt;
                        &lt;option&gt;Product&lt;/option&gt;
                        &lt;option value="cd"&gt;CD&lt;/option&gt;
                        &lt;option value="dvd"&gt;DVD&lt;/option&gt;
              &lt;/select&gt; &lt;br class="clearBoth" /&gt;
  
              &lt;label&gt;Comment :&lt;/label&gt;
                  &lt;textarea name="comment"  id="comment" class="contact-input-box1"&gt;&lt;/textarea&gt;&lt;br class="clearBoth" /&gt;
                  &lt;p id="button1"&gt;&lt;/p&gt;
  
              &lt;label&gt;&amp;nbsp;&lt;/label&gt;
                  &lt;input name="button" type="submit" id="button" title="Submit" value="Submit" onclick="myFunction()" /&gt; 
          &lt;/form&gt;
  </code></pre>
  
  <p>but I am unable to open the popup. form is working fine. currently it is went on thankyou.html page. I need to open the thank you message in popup box. </p>