Who is online?
In total there are 2 users online :: 1 Registered, 0 Hidden and 1 Guest Unknown Data
Most users ever online was 246 on Tue Jan 31, 2012 2:47 am
Statistics
We have 107 registered usersThe newest registered user is KAN_GU_ROO
Our users have posted a total of 1539 messages in 169 subjects
Latest topics
» Welcome To AvacWeb!by KAN_GU_ROO Today at 12:17 pm
» affiliate space???
by LGforum Today at 10:10 am
» Print a Particular Post
by ion-cube Mon Feb 20, 2012 6:45 am
» Tooltips..................
by CraZy.CloWn Wed Feb 15, 2012 3:03 am
» AvacDom Selector Method
by LGforum Tue Feb 14, 2012 11:08 pm
Adsense DOM insertion
AvacWeb :: :: Javascript & jQuery
Page 1 of 1 • Share •
Adsense DOM insertion
I am unable to insert the Adsense code to the #page-footer because FM don't allow us adding HTML there ...so we need to inject it. But I couldn't get the results.
this is the default html of adsense code:
I used something like
used this for html to js conversion http://www.javxs.com
any help
this is the default html of adsense code:
- Code:
<script type="text/javascript"><!--
google_ad_client = "ca-pub-xxxxxxxxxxxx";
/* EducationBottom */
google_ad_slot = "7723474639";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
I used something like
- Code:
var script = document.createElement("script");
var script2 = document.createElement("script");
script.type = "text/javascript";
script2.type = "text/javascript";
script.src = "<"+"!--\ngoogle_ad_client = \"ca-pub-xxxxxxxxxxxx\";\n\/* EducationBottom *\/\ngoogle_ad_slot = \"7723474639\";\ngoogle_ad_width = 468;\ngoogle_ad_height = 60;\n\/\/--"+">";
script2.src = "http://pagead2.googlesyndication.com/pagead/show_ads.js";
document.getElementById('page-footer').appendChild(script+script2);
used this for html to js conversion http://www.javxs.com
any help
ion-cube
Status: Testing
Posts: 108
Join date: 2011-10-19
Age: 23
Location: Pakistan
Re: Adsense DOM insertion
It isn't working, because look at the Javascript.
Specifically this:
Its setting the scripts source rather than innerHTML.
Also, you must have the forumotion google adsense removed with credits before it will work, due to how google finds the ads.
Specifically this:
- Code:
script.src = "<"+"!--\ngoogle_ad_client = \"ca-pub-xxxxxxxxxxxx\";\n\/* EducationBottom *\/\ngoogle_ad_slot = \"7723474639\";\ngoogle_ad_width = 468;\ngoogle_ad_height = 60;\n\/\/--"+">";
Its setting the scripts source rather than innerHTML.
Also, you must have the forumotion google adsense removed with credits before it will work, due to how google finds the ads.

LGforum
Status: Hope you like the new design of this board.
Forum Version: Phpbb3
Posts: 600
Join date: 2011-10-05
Location: UK

Re: Adsense DOM insertion
hmmm...
I am now working with an iframe method...& YES its successful
Also, you must have the forumotion google adsense removed with credits before it will work, due to how google finds the ads.
The same was said to me by Dion; but I think there is NOT the case. I have asked many FM members before this or Dion's forum was made that adsense code can be inserted in widget panel & they work ALONG WITH FM's ads
I am now working with an iframe method...& YES its successful
Also, you must have the forumotion google adsense removed with credits before it will work, due to how google finds the ads.
The same was said to me by Dion; but I think there is NOT the case. I have asked many FM members before this or Dion's forum was made that adsense code can be inserted in widget panel & they work ALONG WITH FM's ads
ion-cube
Status: Testing
Posts: 108
Join date: 2011-10-19
Age: 23
Location: Pakistan
Re: Adsense DOM insertion
Strange. I would have thought that, the google information would only be sent and recieved from the first set. But I believe you.
Anyway, thanks for leting me know.
Anyway, thanks for leting me know.

LGforum
Status: Hope you like the new design of this board.
Forum Version: Phpbb3
Posts: 600
Join date: 2011-10-05
Location: UK

Re: Adsense DOM insertion
I think you can load multiple adsense's into one page.

Bilde- Posts: 54
Join date: 2011-11-04
Location: http://127.0.0.1/
Re: Adsense DOM insertion
Not more than threeBilde wrote:I think you can load multiple adsense's into one page.
ion-cube
Status: Testing
Posts: 108
Join date: 2011-10-19
Age: 23
Location: Pakistan
AvacWeb :: :: Javascript & jQuery
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum