Jump to content

Lightbox Form Issue After Submit


reflex84
 Share

Recommended Posts

Hi, I am having issues with a form that I have got which pops up in a lightbox frame (fancybox).I've got a text link, that when it is clicked, a form pops up in lightbox frame ... I fill the form in, click submit and the "success" message appears as normal. I close the lightbox, but when I click on the text link to open the form again, I get the "success" message from the previous submission and not the form! I need it to upload the form... I've been struggling for hours trying to work this out but not getting anywhere! Click this link to see the form and to try it out yourself if you'd like.http://www.testing123.co.za/index.htm How do I sought this problem out? If you need any information, like javascript, let me know ... Appreciate your help! D.

  • Like 1
Link to comment
Share on other sites

Should anything be done to the a href of the link that opens the lightbox?

<a id="various1" href="#res">Enquire Now</a>

The href above is #res which opens a hidden div (which is the form):

<div style="display: none;">  <div id="res"><div id="contact">       <div id="message"></div>   <form method="post" action="ajax-contact-form-extended/ajax-contact-extend/contact.php" name="contactform" id="contactform">   <fieldset>   <legend>Please fill in the following form to contact us</legend>   <label for="name" accesskey="U"><span class="required">*</span> Your Name</label>   <input name="name" type="text" id="name" size="30" value="" />   <br />   <label for="email" accesskey="E"><span class="required">*</span> Email</label>   <input name="email" type="text" id="email" size="30" value="" />   <br />   <label for="phone" accesskey="P"><span class="required">*</span> Phone</label>   <input name="phone" type="text" id="phone" size="30" value="" />   <br />   <label for="subject" accesskey="S">Subject</label>   <select name="subject" id="subject">	 <option value="Support">Support</option>	 <option value="a Sale">Sales</option>	 <option value="a Bug fix">Report a bug</option>   </select>   <br />   <label for="comments" accesskey="C"><span class="required">*</span> Your comments</label>   <textarea name="comments" cols="40" rows="3" id="comments" style="width: 350px;"></textarea>   <p><span class="required">*</span> Are you human?</p>   <label for="verify" accesskey="V">   <img src="ajax-contact-form-extended/ajax-contact-extend/image.php" alt="Image verification" border="0"/></label>   <input name="verify" type="text" id="verify" size="6" value="" style="width: 50px;" /><br /><br />   <input type="submit" class="submit" id="submit" value="Submit" />   </fieldset>   </form></div>  </div></div>

I tried saving the form in a text document and using ajax to open the lightbox and form - is this better:

<a id="various22" href="form.txt">Enquire Now</a>

I'm lost - I doubt I'll get this right, which I've been trying for weeks now!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...