开发者

Debugging an error message in Firebug

I get this error message in Firebug:

Permission denied for <http://googleads.g.doubleclick.net> to call method Location.toString

It comes from this page: http://www.comehike.com/outdoors/trees/add_spotted_trees.php?hike_id=108

The login 开发者_运维百科credentials for this page are: test@comehike.com | password

When I look at it in Firebug, using the Console --> Errors view, I see that error first, followed by a number of other errors, but I can't really double-click on the errors to see what line they are coming from, and the line isn't written there as far as I can see. There are some line references on the page, but they lead to pretty random spots.

Any ideas how to debug such a thing? I am new to JS and FireBug.

Thanks, Alex


The Location.toString error is usually due to some ad-serving javascript code, trying to get a text version of the current page's location. Firefox denies access to this information to 3rd party scripts by default, since 3rd party scripts should have no business knowing exactly what page you're on.

Basically it's an attempt by ad networks to work around some clients not sending referers, by trying to grab the location data directly.


In firebug under the "bug" icon (upper left when open) you'll see a pause button (in the console tab). This will cause the page to stop loading and jump to the exact error in the script.

However, when I visited the page I do not see any errors.


body' onLoad is:

initializeTreeHike( , );

You don't need to use comma if you wish to pass no parameters to the function.


When I follow the provided link in Firefox 4.0 with Firebug 1.7, I don't receive the error you encountered. What I do receive however is the following:

Syntax error: initializeTreeHike( , );

It appears this is coming from line 326 in add_spotted_trees.php in the following line:

<body onload="initializeTreeHike( , );"

Perhaps you meant to pass in empty strings as parameters?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜