I have a script from GhostCPA that puts a CPA offer page into an Iframe so that only the name and email fields show up on my landing page, making it look as though it's a part of my landing page when in fact it is really the CPA offer in an Iframe. Then, the script allows people to fill out the name and email (for example) and submit. Then the script resizes the Iframe so that the second page form shows up, typically with name, address, and several other fields. The script is able to redirect users to a new page, but only if I choose not to resize the Iframe to fit the second page.
I need the following script to redirect users after they submit their information on the second iframed page. Here is the code I have currently. I need to make this code work to redirect users upon 2nd page submit/action and I need it to be cross browser compatible:
Head:
<script type='text/javascript'>
different=1;
base=1;
function raf(arg) {
[login to view URL]('bframe').[login to view URL] = '-508px';
[login to view URL]('bframe').[login to view URL] = '-265px';
[login to view URL]('bframe').[login to view URL] = '690px';
[login to view URL]('bframe').[login to view URL] = '1423px';
[login to view URL]('odiv').[login to view URL] = '357px';
[login to view URL]('odiv').[login to view URL] = '423px';
}
function redirect() {
[login to view URL] = "[login to view URL]";
}
function gothere(arg) {
var different = arg;
if (different > base) {
base = different; redirect();
}
setTimeout(function(){gothere([login to view URL])},100)
}
</script>
Body:
<div style='overflow: hidden; width: 763px; height: 66px; position: relative;' id='odiv'>
<iframe id='bframe' onload='window.ghost1=function(arg){window.ghost2=arg;
if(different<4){
different++;
base=arg;
}else{if(window.ghost2==(base+1)){raf();}}
setTimeout("[login to view URL]([login to view URL])",1050);}
setTimeout("[login to view URL]([login to view URL])",530);' name='bframe' src='[login to view URL]' style='border: 0pt none ; left: -328px; top: -512px; position: absolute; width: 1440px; height: 707px;' scrolling='no'></iframe></div>