Copy link to clipboard
Copied
Hi,
So I have a PHP form that is quite long. It is rendered in an iFrame in another html page (for css reason).
I have set the dimensions of the iFrame to be as long as the form itself, as I believe that have a scroll bar that goes down "the middle of the page" (as it were - i.e. down the side of the iFrame) as well as down the edge of the page (the actualy parent page) is confusing for the user, and ugly.
However, by the time the user gets to the bottom of the form, they are quite a long way down the "_parent" page. So, when they click 'Submit', and the $insertGoTo = "/thanku.html" executes, they don't actually see the Thank You page, because it renders in the iFrame that they're at the very bottom of. The only way they see it is if they then choose to scroll up to the top of the page.
Is there any way of getting the parent page to default back to the top at this point?
Failing that, is there anyway of getting the $insertGoTo command to GoTo the parent page instead of the iFrame?
Thank you.
I got it: I put this at the top of my thanku.php page:
<script language="JavaSCript">
if (top.location != location) top.location.href = location.href;
</script>
This breaks the page out of the frame.
Copy link to clipboard
Copied
Might make this easier to answer if you can see the page in question:
http://www.whataretheyreallylike.com/review.html
Your thoughts, please?
Copy link to clipboard
Copied
Wouldn't it be simpler to work on the "css reason" for the form being in a IFrame so that you could integrate the IFrame page's code into the parent page?
What is that reason?
Copy link to clipboard
Copied
I got it: I put this at the top of my thanku.php page:
<script language="JavaSCript">
if (top.location != location) top.location.href = location.href;
</script>
This breaks the page out of the frame.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more