I am writing some code inside a portal. I have searched high and low for 2 days now with no luck. The portal that I am writing the code in, uses iframes, and it is the top most frame. When an "app" is clicked, from the portal, it displays my program. Without telling a long story, I have to also use an iframe. My page displays this iframe to take a credit card, and it listens for the response of approved or declined. I also pass the return url to the code in the iframe. Consequently, when the transaction is complete, I am redirected to the url that I passed....but it is in the iframe on my page. I know that I can use this:
<script language="JavaScript" type="text/javascript">
function breakout_of_frame()
{
if (top.location != location)
{
top.location.href = document.location.href;
}
}
</script>
However that code breaks out to the top most frame, taking me out of the portal. I need to break out of the frame to the parent, and not the top. I have tried changing this code using parent, and it does not work. I have also used target="_parent"
and that also does not work for my situation. (because I'm not submitting a form, I'm just sending a return url) Any help would be appreciated.