I have an HTML page (say welcome.html) which contains an iframe to a page I have no control over (say app.html). The user performs some actions using the app within the iframe and clicks submit. Once they do this, they are taken to a new page (say thanks.jsp), which loads within the iframe. Is there a way in which I can force thanks.jsp to load in the full frame and not the iframe once submit is clicked? Remember, I have no control over the logic behind that Submit button or app.html. I do however have control over welcome.html and thanks.jsp. If possible, I would like to stick with HTML and/or JavaScript. Thank you in advance.
Share
You probably want to use a framebuster, with a base target in case it fails.
First:
If
thanks.jspis requested via a post request – redirect so it you present the page as the response to a get request.Then:
Include framebuster JavaScript:
Finally:
In case the user doesn’t have JavaScript enabled, make sure they don’t stay in the frame any longer then they have to: