I can't get the google ads working on my site cus of the code there in, mine have to be in html like this

<a href=http://www.site.com TARGET="_blank"><IMG SRC="/banners/banne r2.gif" BORDER="0"></A >

and one of my other ones can just be a direct link to the image or i can upload the image, what can i do???

Dani AI

Generated

Short summary and practical plan based on the thread: ’s carousel shows static image banners but not the AdSense snippets; and were correct that the AdSense code must be used as provided and relies on script execution. The usual cause for the symptom you describe is that the carousel only swaps images or injects HTML in a way that does not run script tags, so the AdSense JavaScript never executes. (html.spec.whatwg.org)

What to try (in order):

  1. Quick test — put a tiny JavaScript snippet into a slide and confirm it executes when the carousel shows that slide. If it does not, the rotator is not running scripts and that explains why image slides work but AdSense doesn’t.
  2. If scripts aren’t executed, switch the carousel to one that supports full HTML/JS slides or change the rotator so it inserts script elements properly (createElement + appendChild) instead of using innerHTML. Dynamically adding a script element is the reliable way to run an external script after the page loads. (stackoverflow.com)

Example pattern (non-AdSense, generic):

var s = document.createElement('script');
s.src = externalScriptUrl;   // keep publisher code unmodified
container.appendChild(s);

If you cannot change the rotator, use an iframe-per-slide approach: host a small HTML page on your domain that contains the AdSense code intact, and have the carousel load that page into an iframe slide. This keeps Google’s code unmodified and lets it run inside its own document context. Also verify the page is listed in your AdSense sites list and follow AdSense implementation rules — do not alter the ad code or hide/overlay ads. (danielcrabtree.com)

Troubleshooting tips: view page source to confirm the ad snippet is present, check the browser console for errors, and test with a minimal HTML carousel that you control before changing your production carousel. ()

Recommended Answers

All 14 Replies

You can use Javascript...


But I am confused as to what you are asking..

Paste me exactly what you are trying to do.. like show me on your site where it does not look right...

AlsoI noticed a space in your image name there.. is that supposed to be there?

You can use Javascript...


But I am confused as to what you are asking..

Paste me exactly what you are trying to do.. like show me on your site where it does not look right...

AlsoI noticed a space in your image name there.. is that supposed to be there?

well a google ad looks like this

<script type="text/javascript"><!--
google_ad_client = "pub-3368649377514939";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

and my ads should just look like this, this is just a sample of one i have now

<a href=http://www.site.com TARGET="_blank"><IMG SRC="/banners/banne r2.gif" BORDER="0"></A >

no spaces

on my other site i can just upload a pic, what should i do

Login to google and change around the code to match your color patterns etc. You should use like a 468x80 approach.

I still don't see what the problem, I mean all you need to do is make the border match your blue and put that ad below or beside or however your making it appear on your site.

im not worried about the color i tried pasting the google code for the size i need but it wont work do i have to edit the code?

What happens? Does nothing show up?

im not worried about the color i tried pasting the google code for the size i need but it wont work do i have to edit the code?

I copied and pasted your exact code.

Works fine for me.... Sounds like you might have the ads maybe "behind" adiv or something.

well it wont show up on my banner carousel, all my aother banners will show up fine accept the google ones, i pick the same size and everything.

im tryin to get them on this

well it wont show up on my banner carousel, all my aother banners will show up fine accept the google ones, i pick the same size and everything.

im tryin to get them on this

Without giving me your admin password I can not view that.

I am sure you do not want to do that either.

If your banner carousel does not support Javascript then it will not work.

yea i prob wont let u, can u help me though?

can i edit this so its not java script, i think thats the problem, the carasole wont support google ads

can i edit this? or can someone. but im not sure if you can edit them

<script type="text/javascript"><!--
google_ad_client = "pub-3368649377514939";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

can u just take javascript out like this?

<script type="text"><!--
google_ad_client = "pub-3368649377514939";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as_rimg";
google_cpa_choice = "CAAQ58WdzgEaCFLK1ovSD_DNKNvD93M";
//--></script>
<script type="text" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

heres what im trying to get them to work on

try this, the password is demo

Oh I see what you mean. Yes, AdSense requires JavaScript support, there is no way around that. Without JavaScript, you can't have the dynamic / text / contextual nature of AdSense.

I suggest you find an alternate ad management / rotator script that supports JavaScript or HTML ads.

Oh I see what you mean. Yes, AdSense requires JavaScript support, there is no way around that. Without JavaScript, you can't have the dynamic / text / contextual nature of AdSense.

I suggest you find an alternate ad management / rotator script that supports JavaScript or HTML ads.

is there any ad services out there that will support my ads?

if any one wants they can run a jpg or gfi banner on it for 15 bucks a month :cool: pm me

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.