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

How do you do one of those slidey things
to keep ads on the viewable page

 6:59 pm on Jul 25, 2003 (gmt 0)

My current code:

<div id='adsense' style='z-index:1; container:positioned; position:absolute; top:7; left:72%'>
<script language='JavaScript'>
google_ad_client = 'some number';
google_ad_width = 120; google_ad_height = 600; google_ad_format = '120x600_as';
// -->
<script language='JavaScript' src='http://google.url'>

This just puts the adsense panel at the top right of my page.

The page consists of search results on the left hand side, with adsense on the right.

Sometimes the search results are many, and the page gets long with plenty of vertical scrolling.

Can anyone suggest code or a link to help me make it so that, when the user scrolls down the page, the adsense panel follows the viewable screen, not the page - i.e. the user scrolls down but adsense stays there in the top right of the monitor..

Thanks for any ideas.



 7:07 pm on Jul 25, 2003 (gmt 0)

Sometimes the search results are many...
? You might want to read the TOS again.

 7:31 pm on Jul 25, 2003 (gmt 0)

Yeah, it's bummer that they don't allow AdSense in search result pages.

For your question, there are 2 ways I can suggest:
1) Keep the ad in a frame.

2) Look at Dynamic Drive site - they have menus they
stay on screen as you scroll. Personally, I find those
annoying, plus I am not sure if you'll be able to do
this without modifying AdSense code (which, as you know,
is not allowed).



 7:37 pm on Jul 25, 2003 (gmt 0)

I dont know if I'm right, but I thought you were not allowed to change the way the adsense banners appear on your webpage? So isn't a code which keeps the Adsense on top of your visitor's display against the TOS?

And anyway something like that is IMO very annoying.

Also it is against the TOS to place adsense banners on search result pages


 7:43 pm on Jul 25, 2003 (gmt 0)

loanuniverse: A-ha! yeah cheers for that, I'll have a re-read see if it applies. I have a feeling it might.

> And anyway something like that is IMO very annoying.
Guess I agree there too really

daugava: I was hoping to achieve whatever, by keeping the adsense code in a div, and then manipulating the div to avoid modifying Google's code.

All in all you guys are right, cheers for the heads-up ;-)

You've maybe saved me from a GoogleBoot... if I backtrack on what I've set up already..


 7:45 pm on Jul 25, 2003 (gmt 0)

>>1) Keep the ad in a frame.

A targeted ad will only appear in the frame if the coding "in the frame" is sufficient to warrant that ad being served there. Google do not take into account what you have in other frames appearing at the same time (as far as I can tell from their correspondence)

So although you could put the ad in a frame, you would have to have enough else in the frame to get a suitable targeted ad. Worst case scenario would be a PSA 'cos there was nothing in the frame to give you a targeted ad!


 7:46 pm on Jul 25, 2003 (gmt 0)

loanuniverse is right, the TOS specifically mentions search results under "Prohibited Uses".


 7:47 pm on Jul 25, 2003 (gmt 0)

from the TOS

You also agree not to display any other text-based or content-targeted advertisement(s) on the same Web page in connection with which an Ad Unit or any Ad is displayed.

The results I'm talking about on my page definitely come under 'text-based ... advertisement(s)'

Yup, pulling it off... cheers guys


 7:49 pm on Jul 25, 2003 (gmt 0)

You could put it in a div and fix the positioning of the div (position:fixed) but that CSS property is not supported by all browsers (notably IE)

it doesn't interfere with the script either..


<added> IE note </added>


 7:56 pm on Jul 25, 2003 (gmt 0)

Cheers Suzy but I think the ppl above were right - looked into it & it is, i think, against the rules in the case of the pages I was placing on. Cheers tho.

Phew. That's the fastest bit of cgi perl editing I've done in a while, wiping out those inclusions. I'm glad I wrote the script the way I did now, with everything in one variable $adsense..

Thanks for the good advice you guys.


 4:55 am on Jul 26, 2003 (gmt 0)

Spoke to the Googlies, & sent them to the site saying, made a right mess there guys, here's how it used to be, is it okay as it is now?, after pulling the offending items

Here's the canned email:

Hello Personage,

Thank you for making the requested changes to your account to comply with our policies. This will contribute to your ongoing success with Google AdSense and ensure consistency for your users' experience.

Probably stuck myself on some spam list but ****.

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