Jump to content

Lightbox Form "thank You" Page


reflex84
 Share

Recommended Posts

Hi, I am busy testing out a lightbox form that I'm working on and I've got all to work except the "success" or "thank you" page.Basically I want the user to fill in the online form and when the they are click 'submit', the "thank you" message or page resolves in the same lightbox that the form was in. Go to www.testing123.co.za/test.htm and click on that link you see saying "AJAX SuperBox".The lightbox is opening up an HTML page within in the test.htm page (basically acting like an iFrame?).When I click submit, the page resolves to the success.htm page (which it should) but not in the lightbox frame. I don't want visitors to leave the test.htm page. My headers at the bottom of my process php form shows as:

';                 $headers  = "From: $from\r\nBCC:{$bcc}\r\n";    $headers .= "Content-type: text/html\r\n";    $success = mail($to, $subject, $sBodyNew, $headers);                 header('Location: http://www.testing123.co.za/success.htm');   ?>

I assume the Location url above needs code added to it so that it works within the lightbox? Or is there an easier way to do this? Thanks guys!

Link to comment
Share on other sites

In AJAX, you receive data in the responseText property. You can send anything you like and ask Javascript to search for a specific thing in order to know that the request was successful.

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...