Jump to content
Sign in to follow this  
reflex84

Lightbox Form "thank You" Page

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!

Share this post


Link to post
Share on other sites

Since it's AJAX, you're going to have to send a success code to Javascript so that Javascript can change the location.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

You said you're using AJAX. If you're using AJAX you must know how to use the responseText property.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...