reflex84 Posted November 7, 2011 Share Posted November 7, 2011 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 More sharing options...
Ingolme Posted November 7, 2011 Share Posted November 7, 2011 Since it's AJAX, you're going to have to send a success code to Javascript so that Javascript can change the location. Link to comment Share on other sites More sharing options...
reflex84 Posted November 7, 2011 Author Share Posted November 7, 2011 Hi, Thanks ... though I have no idea what code to put and where to put the code? Link to comment Share on other sites More sharing options...
Ingolme Posted November 7, 2011 Share Posted November 7, 2011 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 More sharing options...
reflex84 Posted November 7, 2011 Author Share Posted November 7, 2011 Hi, No, I'm not that advanced, so I wouldn't know how to do that, hence why I am asking on this forum. Link to comment Share on other sites More sharing options...
Ingolme Posted November 7, 2011 Share Posted November 7, 2011 You said you're using AJAX. If you're using AJAX you must know how to use the responseText property. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.