2
Permission denied for <http://example.com> to get property

HTMLDocument.body from http://www.example.com.

var c = parseFloat(cf.contentDocument.body.offsetHeight) + 30; 
4
  • 1
    NSFW alert - that domain is registered - I almost opened it from my office. @MitMaro
    – Amarghosh
    Mar 17, 2010 at 9:18
  • Just a place holder page for me, so not registered. But still NSFW, can someone edit in example.com and www.example.com instead.
    – MitMaro
    Mar 17, 2010 at 9:19
  • are you trying to access properties of another window?
    – Amarghosh
    Mar 17, 2010 at 9:22
  • YES I try to access the properties of another window, and the domain is not xxx.com.
    – poo
    Mar 17, 2010 at 9:29

2 Answers 2

5

I believe this is due to the Same Origin Policy implemented by most (all??) browsers. Simply put example.com is not the same origin as www.example.com.

1

With a little guessing about your question, I see 2 possibilies:

  1. Javascript will not let you read data from other domains via Ajax, and you read from a domain different than example.com

  2. You read data from example.com, but you really try to read from www.example.com, and the webserver only serves on www.example.com.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.