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.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Apr 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question buffering outputs from document.write

    Hello,

    anybody knows a way to buffer the outputs from document.write?

    We want to reload the advertising banners on the page when an user browses trough the pictures in our AJAX-Gallery, but the scripts from our advertising partners uses document.write, so we can't call the addBanner() function from inside the gallery-script.

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,854
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    but the scripts from our advertising partners uses document.write, so we can't call the addBanner() function from inside the gallery-script.
    Posting some relevant codes may give us some insight! After all, we are not psychic
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    Senior Coder Dormilich's Avatar
    Join Date
    Jan 2010
    Location
    Behind the Wall
    Posts
    3,291
    Thanks
    13
    Thanked 345 Times in 341 Posts
    Quote Originally Posted by kidata View Post
    anybody knows a way to buffer the outputs from document.write?
    afaik, not at all. you may be able to load it in a, say, iframe, grab the interesting part from there and insert it in your HTML.
    The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
    André Behrens, NY Times Software Developer

  • #4
    New to the CF scene
    Join Date
    Apr 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Dormilich View Post
    afaik, not at all. you may be able to load it in a, say, iframe, grab the interesting part from there and insert it in your HTML.
    thougt about that iframe-way, but i suspect to get two advertising calls - first when addBanner() put that usual banner code
    Code:
    ...
    document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
    document.write ("?nodis=1&amp;zoneid=6211");
    document.write ('&amp;cb=' + m3_r);
    ...
    into the iframe and then the second time, when this is written to the main document where the banner should appear.

  • #5
    Senior Coder Dormilich's Avatar
    Join Date
    Jan 2010
    Location
    Behind the Wall
    Posts
    3,291
    Thanks
    13
    Thanked 345 Times in 341 Posts
    I thought of a hidden iframe
    The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
    André Behrens, NY Times Software Developer


  •  

    Tags for this Thread

    Posting Permissions

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