Google Community
Latest Forums Rules Resources
Custom Search

Go Back   Google Community > Google Forums > Google AdWords & AdSense Forum

GoogleCommunity Sponsor

Reply
 
LinkBack Thread Tools Display Modes
Old 10-12-2008, 06:24 AM   #1 (permalink)
Noogle
 
Join Date: Oct 2008
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
finddemi is on a distinguished road
creating Google Adsense code using javascript

Hi All,

I am trying to create the google adsense code on the fly using the following code. It does not seem to work. Can some one help me please.

var scriptElement = document.createElement("script");

scriptElement.setAttribute("src", "http://pagead2.googlesyndication.com/pagead/show_ads.js");

scriptElement.setAttribute("type", "text/javascript");

var scriptElement1 = document.createElement("script");

scriptElement1.setAttribute("type", "text/javascript");

scriptElement1.text = '<!--google_ad_client ="pub-0227983410707254";' +
'google_ad_slot = "3430804086";' +
'google_ad_width = 728;' +
'google_ad_height = 90;//-->';

document.getElementById("demi").appendChild(script Element1);
document.getElementById("demi").appendChild(script Element);

Appreciate any help. Thanks in advance.
finddemi is offline   Reply With Quote
 
Sponsored Links
Old 10-12-2008, 06:30 AM   #2 (permalink)
Noogle
 
yigiTurkey's Avatar
 
Join Date: Oct 2008
Location: Turkey
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
yigiTurkey is on a distinguished road
Send a message via MSN to yigiTurkey
you can't do
yigiTurkey is offline   Reply With Quote
Old 10-12-2008, 10:28 AM   #3 (permalink)
Noogle
 
Join Date: Oct 2008
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
finddemi is on a distinguished road
Thanks for the response. Could you please explain why cannot this be done. Sorry to sound ignorant.
finddemi is offline   Reply With Quote
Old 10-12-2008, 02:12 PM   #4 (permalink)
Noogle
 
yigiTurkey's Avatar
 
Join Date: Oct 2008
Location: Turkey
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
yigiTurkey is on a distinguished road
Send a message via MSN to yigiTurkey
No , you aren't uneducated...because Google isn't giving that the permission.
yigiTurkey is offline   Reply With Quote
The Following User Says Thank You to yigiTurkey For This Useful Post:
finddemi (10-12-2008)
Old 10-20-2008, 11:22 AM   #5 (permalink)
Noogle
 
Join Date: May 2007
Location: in the moon
Posts: 21
Thanks: 2
Thanked 0 Times in 0 Posts
Aryex is on a distinguished road
I think yigiTurkey is right. it is no allowed to create custom scripts and change the code that it is given.

You should check out adsense terms of usage here:
https://www.google.com/adsense/suppo...n&answer=48182
Aryex is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating A Website to Earn AdBrite or AdSense Revenue google berry Google AdWords & AdSense Forum 10 05-01-2008 08:00 PM
Put Google Adsense code devang Google AdWords & AdSense Forum 2 08-11-2006 06:53 AM
Can I put adsense code in a javascript include? eelsource Google AdWords & AdSense Forum 2 12-18-2005 08:16 AM
JavaScript scroller that can scroll AdSense ads ? Razvan Google AdWords & AdSense Forum 4 08-29-2005 01:42 PM
Can I put adsense code in a javascript include? eelsource Google AdWords & AdSense Forum 2 01-01-1970 12:33 PM


All times are GMT -8. The time now is 03:33 AM.


Powered by vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© 2004–2007 Google Community