Board index   FAQ   Search  
Register  Login
Board index PHP PHP Scripts

ifram onload

Links for php scripts

Moderators: macek, egami, gesf

ifram onload

Postby gimmle » Tue Oct 16, 2012 2:47 am

Hi, I have a problem with a code.
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
gimmle
New php-forum User
New php-forum User
 
Posts: 2
Joined: Tue Oct 16, 2012 2:43 am

Re: ifram onload

Postby seandisanti » Tue Oct 16, 2012 12:30 pm

does it work if you take it out of the iframe?
seandisanti
php-forum Fan User
php-forum Fan User
 
Posts: 773
Joined: Mon Oct 01, 2012 12:32 pm

Re: ifram onload

Postby jinijames » Wed Nov 07, 2012 4:12 am

Alert "Frame is loaded" immediately after a frame is loaded:
<html>
<head>
<script>
function load()
{
alert("Frame is loaded");
}
</script>
</head>

<frameset cols="50%,50%">
<frame src="frame_a.htm" onload="load()">
<frame src="frame_b.htm">
</frameset>

</html>
jinijames
New php-forum User
New php-forum User
 
Posts: 20
Joined: Fri Oct 19, 2012 4:32 am
Location: India


Return to PHP Scripts

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.