Weird Google Ads problem

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
legend986
Forum Contributor
Posts: 258
Joined: Sun Jul 15, 2007 2:45 pm

Weird Google Ads problem

Post by legend986 »

When I've inserted google ads onto my website, I can see them in Opera and IE but however they are not visible in Firefox. I checked to see if some extension is causing this but then, there's nothing that is interferring. I don't know where to start looking for the problem. Any help please?
User avatar
WaldoMonster
Forum Contributor
Posts: 225
Joined: Mon Apr 19, 2004 6:19 pm
Contact:

Post by WaldoMonster »

Do you have disabled JavaScript in Firefox?
User avatar
legend986
Forum Contributor
Posts: 258
Joined: Sun Jul 15, 2007 2:45 pm

Post by legend986 »

Yes, its enabled. I've just checked it once again.
thiscatis
Forum Contributor
Posts: 434
Joined: Thu Jul 20, 2006 11:00 am

Post by thiscatis »

Have you checked using Firebug? Are you sure adblock isn't enabled? Which version of Firefox are you using?
Have you cleared your cache?
User avatar
WaldoMonster
Forum Contributor
Posts: 225
Joined: Mon Apr 19, 2004 6:19 pm
Contact:

Post by WaldoMonster »

It is a good idea to first validate the page with:
Online: http://validator.w3.org/
Firefox plugin: http://users.skynet.be/mgueury/mozilla/
User avatar
legend986
Forum Contributor
Posts: 258
Joined: Sun Jul 15, 2007 2:45 pm

Post by legend986 »

Yes I've cleared the cache. Firebug says that there's an erro in Line 2 and gives me this thing when I put a breakpoint at show_ads.js

Code: Select all

undefined
c has no properties
[Break on this error] var K=document;function N(){var c=K.cookie,b=Math.round((new Date).getTime()/100...
show_ads.js (line 2)
1var input_red='input-warn';var input_green='input-ok';var input_ok_box='input-ok-content';var input_warn_box='input-warn-content';var img_blank='blank.gif';var img_tick='aff_tick.gif';var img_cross='aff_cross.gif';var uagent=navigator.userAgent.toLowerCase();var is_safari=((uagent.indexOf('safari')!=-1)||(navigator.vendor=="Apple Computer, Inc."));var is_opera=(uagent.indexOf('opera')!=-1);var is_webtv=(uagent.indexOf('webtv')!=-1);var is_ie=((uagent.indexOf('msie')!=-1)&&(!is_opera)&&(!is_safari)&&(!is_webtv));var is_ie4=((is_ie)&&(uagent.indexOf("msie 4.")!=-1));var is_ie7=((is_ie)&&(uagent.indexOf("msie 7.")!=-1));var is_moz=(navigator.product=='Gecko');var is_ns=((uagent.indexOf('compatible')==-1)&&(uagent.indexOf('mozilla')!=-1)&&(!is_opera)&&(!is_webtv)&&(!is_safari));var is_ns4=((is_ns)&&(parseInt(navigator.appVersion)==4));var is_kon=(uagent.indexOf('konqueror')!=-1);var is_win=((uagent.indexOf("win")!=-1)||(uagent.indexOf("16bit")!=-1));var is_mac=((uagent.indexOf("mac")!=-1)||(navigator.vendor=="Apple Computer, Inc."));var 
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Thanks for posting code that breaks forum layout legend986. :roll: I've trimmed down the code.
User avatar
legend986
Forum Contributor
Posts: 258
Joined: Sun Jul 15, 2007 2:45 pm

Post by legend986 »

I'm sorry... I didn't mean it... THe page was displaying correctly in my window... Anyways sorry [s]abt[/s] about that...
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:11. Please use proper, complete spelling when posting in the forums. AOL Speak, leet speak and other abbreviated wording can confuse those that are trying to help you (or those that you are trying to help). Please keep in mind that there are many people from many countries that use our forums to read, post and learn. They do not always speak English as well as some of us, nor do they know these aberrant abbreviations. Therefore, use as few abbreviations as possible, especially when using such simple words.

Some examples of what not to do are ne1, any1 (anyone); u (you); ur (your or you're); 2 (to too); prolly (probably); afaik (as far as I know); etc.
User avatar
legend986
Forum Contributor
Posts: 258
Joined: Sun Jul 15, 2007 2:45 pm

Post by legend986 »

Its my site problem itself...

Edit: Ok ok... I admit defeat. The abbreviations in my post are a result of my habit. I'll change myself. :P
Last edited by legend986 on Thu Aug 16, 2007 8:32 am, edited 2 times in total.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

There's a Google Search...
User avatar
legend986
Forum Contributor
Posts: 258
Joined: Sun Jul 15, 2007 2:45 pm

Post by legend986 »

Oh, there's should've been an ad too. I'm able to see it both in Opera and IE but I wonder whats wrong with Firefox now... :(
thiscatis
Forum Contributor
Posts: 434
Joined: Thu Jul 20, 2006 11:00 am

Post by thiscatis »

AAAAAH, IPB ;)
I had a similar problem once, I think the ad is showing BEHIND the forum layout.
Try altering the height or margin from the div it's in.
User avatar
legend986
Forum Contributor
Posts: 258
Joined: Sun Jul 15, 2007 2:45 pm

Post by legend986 »

Thanks but I didn't understand which div to change... :?

Oh My God! 8O Its a problem of Google itself... I've got this information from my IPB customer area...

Code: Select all

IPB strips the ability in Firefox to retrieve the cookies via javascript. This is done as an added protection against XSS attacks
that are presently unknown (in other words, we know of no current XSS attacks - however if one were to get through, this would prevent the
attack from being able to get your sensitive cookie data, which is typically the goal of an XSS attack).

Google is trying to access the cookies, which we prevent. Outside of Google updating their code, which is unlikely, there is little that
can be done.

The block of code that was previously posted in this report can be deleted entirely (the entire if statement and code inside it) - just
note that this added protection will be missing in Firefox. In IE it is not necessary, because IE supports the "http-only" flag. As of
version 2.0.0.5, Firefox also supports the http-only flag, so the javascript is a bit redundant for more recent versions of Firefox
anyways.
thiscatis
Forum Contributor
Posts: 434
Joined: Thu Jul 20, 2006 11:00 am

Post by thiscatis »

a solution can be an iframe, but the problem is that you keywords will not be of great value then..
User avatar
legend986
Forum Contributor
Posts: 258
Joined: Sun Jul 15, 2007 2:45 pm

Post by legend986 »

Hmm... There was a fix available in the Customer Area by some member... I downloaded that and now it works fine. Thanks for all the help...
Post Reply