I'm using the login form tag inside of a fancybox iframe.
For my return parameter, I'm using <?php echo $_SERVER['HTTP_REFERER']; ?>
, so that it takes the user back to whichever page they started from. Unfortunately, it takes them back to that page within the iframe.
How do I add a target="_top"
attribute to the return link, or some other jQuery call that will close the iframe and manage the redirect within the parent window?
Thanks,
ty
The solution was to not use the EE login form tag, but rather hard code the form. That allowed the addition of a target attribute:
<form method="post" action="http://domain.com/" target="_top" >
<div class='hiddenFields'>
<input type="hidden" name="XID" value="XXXXXXXXXXXXXXXXXXXXXXXXXXXXX" />
<input type="hidden" name="ACT" value="12" />
<input type="hidden" name="RET" value="<?php echo $_SERVER['HTTP_REFERER']; ?>" />
<input type="hidden" name="site_id" value="1" />
</div>
Thanks for the help.
ty