Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-13-2010, 03:46 PM   PM User | #1
kidata
New to the CF scene

 
Join Date: Apr 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
kidata is an unknown quantity at this point
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.
kidata is offline   Reply With Quote
Old 04-13-2010, 03:55 PM   PM User | #2
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,689
Thanks: 158
Thanked 2,184 Times in 2,171 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
Quote:
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
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Old 04-13-2010, 03:58 PM   PM User | #3
Dormilich
Senior Coder

 
Dormilich's Avatar
 
Join Date: Jan 2010
Location: Behind the Wall
Posts: 2,907
Thanks: 10
Thanked 293 Times in 289 Posts
Dormilich is on a distinguished road
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.
__________________
please post your code wrapped in [CODE] [/CODE] tags
Dormilich is offline   Reply With Quote
Old 04-13-2010, 04:22 PM   PM User | #4
kidata
New to the CF scene

 
Join Date: Apr 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
kidata is an unknown quantity at this point
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.
kidata is offline   Reply With Quote
Old 04-13-2010, 09:23 PM   PM User | #5
Dormilich
Senior Coder

 
Dormilich's Avatar
 
Join Date: Jan 2010
Location: Behind the Wall
Posts: 2,907
Thanks: 10
Thanked 293 Times in 289 Posts
Dormilich is on a distinguished road
I thought of a hidden iframe
__________________
please post your code wrapped in [CODE] [/CODE] tags
Dormilich is offline   Reply With Quote
Reply

Bookmarks

Tags
buffer, output

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:11 PM.


Advertisement
Log in to turn off these ads.