homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Google / Google AdSense
Forum Library, Charter, Moderators: incrediBILL & jatar k & martinibuster

Google AdSense Forum

choosing banner or skyscraper dynamically
is it possible? is it allowed?

 7:07 am on Jul 14, 2003 (gmt 0)

Is it possible to dynamically choose between a banner and skyscraper depending on the user's screen size? You'd need to modify the Javascript a bit, with something like

if WindowWidth() > 1000:
write '<div class="sky">'
<code for skyscraper>
write '</div>
write '<div class="banner">'
<code for banner>
write '</div>'
<code to fetch ad>

which may or may not be sufficient change to the JavaScript to violate the ToS.

I don't know enough JavaScript to know if this is even possible, though.


jeremy goodrich

 5:28 pm on Jul 14, 2003 (gmt 0)

The TOS there says, "no modifications" if I wanted to change something, as their TOS is rather explicit, I would use their customer service email & get permission before risking not getting paid for a TOS violation. ;)


 8:35 pm on Jul 14, 2003 (gmt 0)

Ah, but...

if (screenwidth > 800) {
document.write "the skyscraper code";
} else {
document.write "the banner code";

...won't change any of the code.

Interesting idea - I like it.

jeremy goodrich

 8:45 pm on Jul 14, 2003 (gmt 0)

:) Actually, my first thought when I read your post -> was sniff the user agent or such, & then write it server side.

The other way, would have been client side doc.write like you are proposing to stay within their TOS but still do what you want. Nice.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Google / Google AdSense
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved