I have a php form with a captcha loading in a floatbox window. When the user enters the wrong spam code by accident, it takes them to a page asking to try again. I need a back button on this page, but I can't seem to find a script that works. I tried a simple javascript and a PHP script, but they both simply close the floatbox, making the user have to reopen the form and fill it out from the start.
Please help!
Thanks.
PS - here is a link to what I'm talking about:
http://www.allaboutmelive.com then click on "Contact"
HTML iFrame - need back button
Page: 1
Author | Post |
---|---|
potterspread
|
#1 Fri May 01, 2009 5:37 pm
|
Guest | |
#2 Fri May 01, 2009 5:56 pm
|
|
Administrator
Registered: Aug 2008
Posts: 3382
|
I wouldn't try to use history.back for this. History is problematic in iframes and behaves differently in different browsers. Just refresh the floatbox content with a direct reference to the contact page.
Something like: <input type="button" value="<<<BACK" onClick="parent.fb.loadAnchor('/mail_form/form.php', 'sameBox:true someOptionName:someOptionValue');"> And put any other floatbox options you might need (like width, height etc.) after the sameBox:true option. |
#3 Sun May 03, 2009 3:58 am
|
|
Administrator
Registered: Aug 2008
Posts: 3382
|
No, no. I didn't mean you should put the literal string "someOptionName:someOptionValue" in the second loadAnchor parameter. That's there to indicate that if you have some options to add to that loadAnchor call, that's the place to put those options. But I mean real options that mean something to floatbox, like maybe "width", "height", etc. Don't just cut and paste that line verbatim but use it as a guide to how to write your own onClick action.
|
Page: 1