Welcome to WebmasterWorld Guest from 54.159.101.208

Forum Moderators: incrediBILL & martinibuster

Message Too Old, No Replies

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)

Junior Member

10+ Year Member

joined:Dec 31, 2002
posts:150
votes: 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>
<script language='JavaScript' src='http://google.url'>
</script>
</div>

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 July 25, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 16, 2002
posts:1404
votes: 0


Sometimes the search results are many...
? You might want to read the TOS again.
7:31 pm on July 25, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:July 7, 2003
posts:54
votes: 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).

Andy

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 21, 2003
posts:897
votes: 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 July 25, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Dec 31, 2002
posts:150
votes: 0


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

Zygoot:
> 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 July 25, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 5, 2002
posts:1713
votes: 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 July 25, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member jenstar is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Dec 22, 2002
posts:4663
votes: 0


loanuniverse is right, the TOS specifically mentions search results under "Prohibited Uses".
[google.com...]
7:47 pm on July 25, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Dec 31, 2002
posts:150
votes: 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 July 25, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member suzyuk is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Oct 1, 2002
posts:5199
votes: 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..

Suzy

<added> IE note </added>

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

Junior Member

10+ Year Member

joined:Dec 31, 2002
posts:150
votes: 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 July 26, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Dec 31, 2002
posts:150
votes: 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 ****.