Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    New Coder
    Join Date
    Feb 2004
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile Unsolved mystery - can you solve it??

    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!

  • #2
    Regular Coder
    Join Date
    Jul 2002
    Posts
    698
    Thanks
    0
    Thanked 0 Times in 0 Posts
    set the width and height of the iframe to something larger than 0

  • #3
    New Coder
    Join Date
    Feb 2004
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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...

  • #4
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,037
    Thanks
    0
    Thanked 250 Times in 246 Posts
    Why don't you have access to that page? Is it from another domain or something? Which page can you modify?

  • #5
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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...
    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.

    Code:
    <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

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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...
    Check out the Forum Search. It's the short path to getting great results from this forum.

  • #7
    New Coder
    Join Date
    Feb 2004
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #8
    Regular Coder
    Join Date
    Jul 2002
    Posts
    698
    Thanks
    0
    Thanked 0 Times in 0 Posts
    sounds to me like ur breaking rule 1.4 of the rules

  • #9
    New Coder
    Join Date
    Feb 2004
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #10
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    Check out the Forum Search. It's the short path to getting great results from this forum.

  • #11
    Regular Coder
    Join Date
    Jul 2002
    Posts
    698
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    Code:
     
    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();">

  • #12
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    1. Why do you need to use an iframe?
      Use document.write to write the script to the page.

    1. Why would you set the iframe attributes to 0?


    .....Willy

    Edit: Unsolved mystery - can you solve it??
    Is not an appropriate title! Seems like a bait.....
    Last edited by Willy Duitt; 02-04-2004 at 01:11 AM.

  • #13
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,037
    Thanks
    0
    Thanked 250 Times in 246 Posts
    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?

  • #14
    New Coder
    Join Date
    Feb 2004
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by Garadon

    The code are to be put in the iframe document.
    Code:
     
    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:
    Code:
    this.moveTo(0,0);
    this.resizeTo(100,100);

  • #15
    New Coder
    Join Date
    Feb 2004
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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?
    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.


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •