javascript - Posting to an iframe - page rendered within the iframe instead of parent frame -
i'm implementing 3d secure. requires form auto submitted inside of iframe, response can show bank username/password box within said iframe.
<form id="3d_form" target="3d_iframe" action="<?php echo $acsurl; ?>" method="post"> <input type="hidden" name="pareq" value="<?php echo $pareq; ?>" /> <input type="hidden" name="md" value="<?php echo $md; ?>" /> <input type="hidden" name="termurl" value="<?php echo $termurl; ?>" /> </form> <iframe name="3d_iframe" width="100%" height="400" frameborder="0" src="<?php echo $acsurl; ?>"></iframe> once user enters username/password success code posted url supply original iframe post (termurl).
problem is, termurl renders page websites theme/template within iframe, page within page if makes sense?
i'm using joomla. termurl function within controller like:
http://www.mywebsite.com/index.php?option=com_mycontroller&task=mycontroller.callback
any idea how can either render blank webpage within iframe, or better yet, re-render entire page without iframe...? have reload page using javascript callback function:
function callback() { echo "<!doctype html>"; echo "<head>"; echo "<title>form submitted</title>"; echo "<script type='text/javascript'>window.parent.location = 'http://mywebsite.com/index.php?option=com_mycontroller&view=myview'</script>"; echo "</head>"; echo "<body></body></html>"; }
add die; @ end of function in controller. guess work out , wont open iframe in , iframe
Comments
Post a Comment