I am trying to show a form action on an iframe, but for some reason this isn't working.
here is the code:
- Code: Select all
<body onload=submitfunc()>
<iframe id="3DS_iframe" name="3DS_iframe" width="600" height="350" scrolling="auto" frameborder="1"></iframe>
<form name="3Dform" id="3Dform" action="{$_SESSION['payment']['acsurl']}" method="POST" target="3DS_iframe">
<input type="hidden" name="PaReq" value="{$_SESSION['payment']['pareq']}" />
<input type="hidden" name="TermUrl" value="{$_SESSION['SC_BasePath']}home/SagePay3DCallback.php">
<input type="hidden" name="MD" value="{$_SESSION['payment']['md']}" />
<input type="submit" value="Proceed to 3D secure authentication" />
</form>
</body>
<script type="text/javascript">
submitfunc(){
document.getElementById('3Dform').submit();
};
</script>
thanks for your help


