Jingo
Jingo

Reputation: 778

Iframe submits and user is redirected back to original page, but iframe still appears to be present?

I have some JavaScript that spawns an iframe which requires the user to fill out some details. After they submit the iframe form, they are redirected to where they were previously; however, the iframe appears to still be present as right clicking in firefox brings up "This Frame" options. In addition, I am unable to click links or anything on the page.

On the other hand, if I include a function that closes the iframe after the form submits, the user is again redirected back to the original page, but there are no right click "This Frame" options this time and all the links on the page can be clicked.

Can anyone explain to me what is going on here? Thanks!

Upvotes: 0

Views: 418

Answers (1)

James Cazzetta
James Cazzetta

Reputation: 3220

If using Javascript to redirect, try adding this in front of the redirection:

window.top.location.href = "http://www.site.com"; 

Else, use target="_top":

<form action".." target="_top">
</form>

Upvotes: 1

Related Questions