...

View Full Version : Unsolved mystery - can you solve it??



blacib
02-02-2004, 10:03 AM
Please take a look at the following drop in ad:
http://www.traficdublu.ro/dev/dropin.htm

The script is written in the
http://www.traficdublu.ro/dev/amcuceba.js .

I want to call the dropin.htm (which contains the script) from a new page in an iframe.
The page is located at:
http://www.traficdublu.ro/dev/popup.htm

The problem is that the iframe width and height is 0.
In this case the layer doesn't show up.

I tried to modify in the http://www.traficdublu.ro/dev/dropin.htm the 'document.body.clientWidth' and the 'document.body.clientHeight' to parent.document.body.clientWidth and parent.document.body.clientHeight ; but the layer still doesn't show up.

The script is written in the http://www.traficdublu.ro/dev/amcuceba.js .
I couldn't figure out what do i have to modify in it to get the layer working.

Can you solve this mystery??

Your help is needed.
Thanks!

Garadon
02-02-2004, 03:31 PM
set the width and height of the iframe to something larger than 0

blacib
02-02-2004, 08:57 PM
Originally posted by Garadon
set the width and height of the iframe to something larger than 0

I don't have acces to the page wich contains the iframe.

Something has to be change in the script.
ex: window - > parent.window

BUT i couldn't figure out what... :rolleyes:

glenngv
02-03-2004, 06:53 AM
Why don't you have access to that page? Is it from another domain or something? Which page can you modify?

Willy Duitt
02-03-2004, 09:47 AM
Originally posted by blacib
I don't have acces to the page wich contains the iframe.

Something has to be change in the script.
ex: window - > parent.window

BUT i couldn't figure out what... :rolleyes:

Nothing is going to appear to be in the iframe with the width and height set at 0. Although the dropin.htm is there, the iframe is collapsed to well, nothing.


<HTML>
<HEAD>
<BASE HREF="http://www.traficdublu.ro/dev/">
<TITLE>Alma</TITLE>
</HEAD>
<BODY>
Ads sdf sdf dfg dfg dfg ert dfg dsfg
<script>

</script>
<iframe src="dropin.htm" width=0 height=0></iframe>
</BODY>
</HTML>


Originally posted by glenngv
Why don't you have access to that page? Is it from another domain or something?
Good question.... :)

.....Willy

Roy Sinclair
02-03-2004, 02:37 PM
Originally posted by glenngv
Why don't you have access to that page? Is it from another domain or something? Which page can you modify?

Because it's an AD, and since most of them are served by a third party servers...

blacib
02-03-2004, 09:12 PM
Originally posted by Roy Sinclair
Because it's an AD, and since most of them are served by a third party servers...

Yes, you're right.

Garadon
02-03-2004, 09:33 PM
sounds to me like ur breaking rule 1.4 of the rules

blacib
02-03-2004, 09:39 PM
Originally posted by Garadon
sounds to me like ur breaking rule 1.4 of the rules

1.4) No illegal requests- Do not post requests that are illegal or break the usage terms of the service in question, such as where to download warez, disable pop up ads on your free host etc.

I don't think so...
I want to enable pop-up, not to disable.

Roy Sinclair
02-03-2004, 09:59 PM
Bottom line: You can't alter the iframe from within the frame so if it's coded with 0 width and 0 height then it's simply going to be invisible. Your current approach is doomed.

You'd be better off having the user load a javascript to their page which then writes the appropriate iframe tag or loads an alternative ad via <noscript></noscript> tags for people who surf with JS disabled.

Garadon
02-03-2004, 10:16 PM
if what ur seeking is to force enlarge an iframe from within, this will do it, it has a few lags though
1. you have to know what src the iframe u wanna enlarge has.
2. migth only work on same domain ain't to sure of domain
restrictions :)


The code are to be put in the iframe document.


function forceShow()
{ var realSrc='test.html';
var Iframes=parent.document.getElementsByTagName('iframe');
for(I=0;I<Iframes.length;I++)
{

if(Iframes[I].src==realSrc)
{
Iframes[I].width=100;
Iframes[I].height=100;
}
}
}
</script>
</head>
<body onload="forceShow();">

Willy Duitt
02-04-2004, 01:08 AM
Why do you need to use an iframe?
Use document.write to write the script to the page.
Why would you set the iframe attributes to 0?

.....Willy :rolleyes:

Edit: Unsolved mystery - can you solve it??
Is not an appropriate title! Seems like a bait.....

glenngv
02-04-2004, 01:53 AM
I don't get it. dropin.htm is the ad page and you have access to it, you can modify it. popup.htm is the page that has the iframe that contains the dropin.htm ad. But you can't modify popup.htm which is not the ad itself? If it's really the ad, then why the iframe's size is set to zero?
Hope that makes sense. I'm really confused. Can you enlighten me? :confused:

blacib
02-04-2004, 12:48 PM
Originally posted by Garadon

The code are to be put in the iframe document.


function forceShow()
{ var realSrc='test.html';
var Iframes=parent.document.getElementsByTagName('iframe');
for(I=0;I<Iframes.length;I++)
{

if(Iframes[I].src==realSrc)
{
Iframes[I].width=100;
Iframes[I].height=100;
}
}
}
</script>
</head>
<body onload="forceShow();">



This can be done more simply from the iframe:


this.moveTo(0,0);
this.resizeTo(100,100);

blacib
02-04-2004, 12:49 PM
Originally posted by glenngv
I don't get it. dropin.htm is the ad page and you have access to it, you can modify it. popup.htm is the page that has the iframe that contains the dropin.htm ad. But you can't modify popup.htm which is not the ad itself? If it's really the ad, then why the iframe's size is set to zero?
Hope that makes sense. I'm really confused. Can you enlighten me? :confused:

The javascript which makes the ad to drop-in is located at:
http://www.traficdublu.ro/dev/amcuceba.js

To make the ad drop-in, you have to call from a html page the DropIn function. But the script won't work if you not put those CSS specific code in the html from which you are calling the function. Look at the source code of the:
http://www.traficdublu.ro/dev/dropin.htm

As you can see it works fine...

But i have third-party sites at which i have no access. They got a code from me:
<iframe src="http://www.traficdublu.ro/dev/dropin.htm" width=0 height=0></iframe>
Whit this trick i could show popunder ads on their sites.

Now i want to show drop-in ads, without making my partner sites to change the code.

My biggest suprise was when calling the dropin.htm (in wich wroks fine the drop-in), it doesn't work from the iframe...

Something has to be modifyed in the dropin.htm or/and in the amcuceba.js, but couldn't figured out what.

blacib
02-04-2004, 01:09 PM
I figured out that the script i am using is made by dynamicdrive.com:

http://www.dynamicdrive.com/dynamicindex17/dropinbox.htm



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum