PDA

View Full Version : Adsense script with a sticky note



stefaneh
01-03-2007, 11:14 AM
1) Script Title: Sticky Note

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/stickynote.htm

3) Describe problem: How to place an adsense script with a stickynote

I try to place an adsense ad in the sticknote but it will not show. I have seen this on a other site but I can remember where it was. How can I make it work?

Thanks

jscheuer1
01-04-2007, 07:26 AM
Did you try the obvious?


<DIV id="fadeinbox" style="filter:progid:DXImageTransform.Microsoft.RandomDissolve(duration=1) progid:DXImageTransform.Microsoft.Shadow(color=gray,direction=135) ; -moz-opacity:0">

INSERT ANY HTML TO DISPLAY HERE. DO NOT REMOVE OUTER MOST DIV.<br>
Script <a href="http://www.dynamicdrive.com">Dynamic Drive</a><br>

<div align="right"> <a href="#" onClick="hidefadebox();return false">Hide Box</a>
</div>
</DIV>

That would be (after getting the sticky note to work with the above and making sure that your adsense code is working without the sticky), replacing the red part with the adsense code. There may be script conflicts though. To diagnose that, I would need to see a page that attempted the obvious (as outlined above) and examine it with a javascript error console. Do you have such a page?

stefaneh
01-04-2007, 10:36 AM
Yes I did the obvious and it is not working. The adsense script is working as well as the sticky script independently.

I am still designing the site but you can have a look at www.tips-trends.com I load it up there.

Thanks

jscheuer1
01-04-2007, 05:00 PM
I think you skipped a step as, the adsense code displays in the sticky just fine if it is the only adsense call on the page. In fact, this call (shown here in red, around line 377 in your page's source code as viewed in the browser):


<p align="center"><script type="text/javascript"><!--
google_ad_client = "pub-4855600414439368";
google_alternate_color = "4F657C";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_type = "image";
google_ad_channel ="7712531999";
google_color_border = "4F657C";
google_color_bg = "4F657C";
google_color_link = "FFFFFF";
google_color_text = "FFFFFF";
google_color_url = "FFFFFF";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<script type="text/javascript"><!--
google_ad_client = "pub-4855600414439368";
google_alternate_color = "4F657C";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_type = "text_image";
google_ad_channel ="7712531999";
google_color_border = "4F657C";
google_color_bg = "4F657C";
google_color_link = "FFFFFF";
google_color_text = "FFFFFF";
google_color_url = "FFFFFF";
//--></script>
</div>
</div>
<div id="page_content">

appears to create a problem for the ad in the sticky. This is clearly not a problem with ads in the sticky. Even if I remove the sticky code completely (all of its code, style and markup), the add that you placed in it will not display as long as the above red code remains on the page. I can see no obvious reason for this except that it is some problem either with your markup or with adsense itself. I'd check with adsense or in an adsense support forum.

This is made even more odd by the fact that the script call:


<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

appears seven times on the page. Removing the one around line 442 also fixes it but removing some of the others does not (I did not check all of them, there may be others that will fix it, there are others that will not). This is what makes me think it might be your markup, try validating your page:

http://validator.w3.org/

But, I'd go through the adsense FAQ's first and perhaps search their support forum for other clues first.

I repeat this has nothing to do with the sticky. So, search for answers about ads not appearing due to invalid markup and for answers about ads not appearing with multiple ad calls.

stefaneh
01-04-2007, 07:32 PM
John,

sorry for all the trouble you went through;I just played around a bit and when I use the same header and just past
into the body as follows

<body onload="positionFooter()">
<div id="fadeinbox" style="filter:progid:DXImageTransform.Microsoft.RandomDissolve(duration=1) kprogid:DXImageTransform.Microsoft.Shadow(color=gray,direction=135) ; -moz-opacity:0"><script type="text/javascript"><!--
google_ad_client = "pub-4855600414439368";
google_ad_width = 200;
google_ad_height = 200;
google_ad_format = "200x200_as";
google_ad_type = "image";
//2006-12-28: www.tips-trends.com
google_ad_channel = "4098395191";
google_color_border = "000000";
google_color_bg = "000000";
google_color_link = "FFFFFF";
google_color_text = "CCCCCC";
google_color_url = "999999";
//--></script>
<script type="text/javascript"
src="show_ads.js">
</script>.<br>
Script &#169; <a href="http://www.dynamicdrive.com">Dynamic Drive</a><br>

<div align="right"> <a href="#" onclick="hidefadebox();return false">Hide Box</a>
</div>
</div>


it works so I will just play around with it as I am not an expert but I let you know when I find out thanks for all your help

stefaneh
01-05-2007, 08:03 AM
John,

as simple as that, I had to many adsense on one page, google allows only 3 per page, and of course sticky is the last to call the script for that reason the ad did show. Thanks again