Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

http://googleads.g.doubleclick.net error 1

Status
Not open for further replies.

sbogde

MIS
Jan 16, 2010
2
RO
Hello,


Please take a look at Each of the left links

link 1
link 2
link 3
link 4
link 5

simply calls the my_ext_func() JS function (defined in a different IFRAME!).

so far, so good.

now please also open
"link 1" here for example shows in my FF the following error:
Error: Permission denied for < to get property Window.my_ext_func from <

Source File:
Line: 31

and similar ones for
link 2
link 3
link 4
link 5

now, what is the difference between test2_bad.html and test2_good.html ?

test2_bad.html simply has the ADSENSE code on top of the google map.

please look again at the error returned in FF:
Permission denied for < to get property Window.my_ext_func from <
in other words doesn't like the fact that I am trying to call a function from another IFRAME (Window.my_ext_func).


Do you have any idea how to fix this? I really must use some links that call a JS function defined in a different IFRAME.

Thanks a lot again for your time.

Sorin
 
Ooops... I had Adblock turned on so had no ads, and thus no error.

I suspect the error is because when you have the ads enabled, frame[0] points to Google's iframe, and your script is not there. Instead of using an arbitrary number to refer to your iframe (which could change, as you've now seen), why not give the frame a name / id and refer to it using that instead.

That would be a much more "future-proof" (and generally better) way of doing things.

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Tech Snippets & Info:
 
Hi, Dan!

That was the problem indeed!

I cannot believe I've done such a stupid mistake!

Thanks a lot for your help, Dan!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top