tags:

views:

72

answers:

2
Permission denied for <http://example.com&gt; to get property

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

var c = parseFloat(cf.contentDocument.body.offsetHeight) + 30; 
+3  A: 

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.

MitMaro
+1  A: 

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.

Residuum