title: Open modal windows after submiting PHP contact form (AJAX? jQuery?)
body: <p>I have <em>reformulated my first question</em> because it was too vague I believe!</p>
  
  <p><strong>The case: santz.net/index.contacto.html</strong> (if you want to try sending something it's okay... I recieve it so no problem)</p>
  
  <p>Here's my code for.....</p>
  
  <p><strong>The Contact Form:</strong></p>
  
  <pre><code>    &lt;form id="contact-form" name="contact-form" class="p25" action="contact.php" method="post"&gt;
          &lt;fieldset&gt;
              &lt;label class="name"&gt;
                  &lt;input class="input" type="text" value="Nombre" onfocus="if(this.value == 'Nombre'){this.value = '';}" onblur="if(this.value == ''){this.value='Nombre';}" name="php_name" /&gt;
              &lt;/label&gt;
              &lt;label class="email"&gt;
                  &lt;input class="input" type="email" value="Email" onfocus="if(this.value == 'Email'){this.value = '';}" onblur="if(this.value == ''){this.value='Email';}" name="php_email" /&gt;
              &lt;/label&gt;
              &lt;label class="phone"&gt;
                  &lt;input class="input" type="tel" value="Teléfono" onfocus="if(this.value == 'Teléfono'){this.value = '';}" onblur="if(this.value == ''){this.value='Teléfono';}" name="php_phone" /&gt;
              &lt;/label&gt;
              &lt;label class="message"&gt;
                  &lt;textarea class="textarea" onfocus="if(this.value == 'Mensaje'){this.value = '';}" onblur="if(this.value == ''){this.value='Mensaje';}" name="php_message"&gt;Mensaje&lt;/textarea&gt;
              &lt;/label&gt;
  
              &lt;div class="buttons-wrapper ml20"&gt;
                  &lt;div class="submit-comment"&gt;
                      &lt;span&gt;&lt;/span&gt;
                      &lt;input type="reset" value="Cancelar"&gt;
                  &lt;/div&gt;
                  &lt;div class="submit-comment ml25"&gt;
                      &lt;span&gt;&lt;/span&gt;
                      &lt;input type="submit" value="Enviar"&gt;
                      &lt;div id="clicker"&gt;&lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/fieldset&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p><strong>And here's my PHP code:</strong></p>
  
  <pre><code>&lt;?php
  $field_name = $_POST['php_name'];
  $field_email = $_POST['php_email'];
  $field_phone = $_POST['php_phone'];
  $field_message = $_POST['php_message'];
  
  $field_sender = 's2@hotmail.com';
  
  $mail_to = 's@hotmail.com';
  $subject = 'Mensaje via Santz.net de '.$field_name;
  
  $body_message = 'From: '.$field_name."\n";
  $body_message .= 'E-mail: '.$field_email."\n";
  $body_message .= 'Phone: '.$field_phone."\n";
  $body_message .= 'Message: '.$field_message;
  
  $headers = 'From: '.$field_sender."\r\n";
  $headers .= 'Reply-To: '.$field_email."\r\n";
  
  $mail_status = mail($mail_to, $subject, $body_message, $headers);
  
  if ($mail_status) { ?&gt;
      &lt;script language="javascript" type="text/javascript"&gt;
          alert('Gracias por contactarse, en breve, me pondre en contacto.\n\nSantz Design | www.santz.net');
          window.location = 'index.contacto.html';
      &lt;/script&gt;
  &lt;?php
  }
  else { ?&gt;
      &lt;script language="javascript" type="text/javascript"&gt;
          alert('El envio fallo. Por favor, envie un mail directamente a info@santz.net');
          window.location = 'index.contacto.html';
      &lt;/script&gt;
  &lt;?php
  }
  ?&gt;
  </code></pre>
  
  <p><strong>What I want do do is the following...</strong></p>
  
  <p>The contact form right now works, and I get the email... that's fine... so:</p>
  
  <p>1- I need to eliminate the page refresh/redirection when you submit the form
  2- To replace the refresh/reload/redirect, I need that when the form is submited, I want it to open a modal window (I would put any content there...) <em>(example: <strong>pixeden.com/media-icons/soft-media-icons-set-vol-2</strong> ...the dialog that opens when I hit "Download")</em></p>
  
  <p>This is what another user recommended me for the modal box (it's quite nice): <strong>mywebdeveloperblog.com/my-jquery-plugins/modalpoplite</strong></p>
  
  <p>The thing is I don't understand how to delete the reload/refresh/redirect issue after submiting and I don't understand how to connect the modal box opening event after the form is submited...</p>
  
  <p><strong>NOTE:</strong></p>
  
  <p>I'm quite new to all of this (I'm only aged 17), so I'm not a programmer... just a designer that understands little programming... but I'm learning to program web so I need help.</p>
  
  <p><strong>If PHP is not the way to go and I need to chenge of programming technology, please let me know. I'm open to any programming language that fully solves my problem!</strong></p>
  
  <p>Thanks a lot!!!</p>