Resizing an iFrame after submit...

Wizzoid

Registered Member
Joined
Dec 16, 2008
Messages
94
Reaction score
11
Hi Guys.. I was wondering how this is done.

I've got an iframe on a page of mine, through a dmr it redirects to my fake referersite with CPA Redirector installed and from there to the offerpage.

Now I want the iFrame to resize itself to 1x1 pixels once the visitor presses the sign up button. I'd appreciate any help.

Thanks.
 
you have to use javascript that polls the browser history for changes. godcpa does this. you can buy it in the sales forum.
 
Thanks for the info Arthas. I'm not looking to buy a script tho, I want to know what I'm doing before I start using scripts.

How do I poll the browser history for changes? How should that javascript code look like?
 
heres an old snippet i found

Code:
<html>
<head>

<style>
body {
/*margin: 0px 0px 0px 0px;*/
margin: 0px auto;
}

#outerdiv 
{ 
width:430px;
height:150px;
overflow:hidden;
position:relative;
}

#inneriframe 
{ 
position:absolute; 
top:-430px; 
left:-430px; 
width:1280px; 
height:1200px; 
} 
</style>


</head>
<body>

<script type="text/javascript">
var oldHistLength = history.length;
setInterval ("checkHistory()",1000);
function checkHistory() {
if (oldHistLength != history.length) {

  if (top.location != self.location) {
    //top.location = self.location.href
  }
  
document.body.style.width="100%";
document.body.style.height="100%";
    var o=document.getElementById("outerdiv");
    o.style.width ="100%";
    o.style.height ="100%";
    o.style.position ="absolute";
    o.style.top ="0px";
    o.style.left ="0px";
    o.style.border="none";
    o.style.overflow ="visible";
    o.style.margin="0px";
    var f=document.getElementById("inneriframe");
    f.style.width ="100%";
    f.style.height ="100%";
    f.style.position ="absolute";
    f.style.top ="0px";
    f.style.left ="0px";
    f.style.border="none";
    f.style.margin="0px";
    oldHistLength = history.length;
  }
}
</script>
<div>
<div id="outerdiv"><iframe id="inneriframe" src="http://google.com"></iframe></div>
</div>

</body>
</html>
 
Thanks. I'm still not sure how to implement this on my site, but I'll play around with it.
 
otherwise, just code a javascript function that will resize the iframe upon submission of the form.

For example :
HTML:
<iframe id="the_iframe" width="100%" height="100%" frameborder="0" src="http://yourcpalink.tld/?affId=xxx000"></iframe>
<form action="" method="post" onsubmit="resizeIfr()">
	<fieldset>
		<p><label for="">label</label><input type="text" value="something" name="someotherthing" /></p>
		<p>etc....</p>
	</fieldset>
</form>
<script type="text/javascript">
function resizeIfr(){
	document.getElementById('the_iframe').width = '1px';
	document.getElementById('the_iframe').height = '1px';
	//	If style attribute use following
	document.getElementById('the_iframe').style.width = '1px';
	document.getElementById('the_iframe').style.height = '1px';
	return;
}
</script>
 
Looks great Melvin. Thanks. I'm new to working with javascript, but I'll play around a bit with the 2 scripts. I really need to get this to work, got some great offers in my country which would give me big profit using this method.
 
The first snippet is the right angle, you need to poll the browser history and then make your changes to the iframe after it's changed.

Record its' initial value (it's per tab/window) and then when it's +1, use the style property of the iframe to make your changes. You can also just make it completely hidden and it will still "be there", no need to go 1x1.
 
What should I change in the first snippet?
 
I'm pretty much lost now. I've got no idea on how to alter this script so it will poll the browserhistory and resize the iframe when the visitor has clicked the sign up button. Please take my by the hand and show me step by step. Would really appreciate it.
 
I'm pretty much lost now. I've got no idea on how to alter this script so it will poll the browserhistory and resize the iframe when the visitor has clicked the sign up button. Please take my by the hand and show me step by step. Would really appreciate it.

then just spend the 250 and get GODcpa ;x it'll make its money back faster then you can say superfragilisticexpialidocious :rain::rain::rain:
 
Back
Top