Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

FAQ Topic - Why do I get permission denied when accessing a frame/window? (2012-02-02)

2 views
Skip to first unread message

FAQ server

unread,
Feb 1, 2012, 7:00:02 PM2/1/12
to
-----------------------------------------------------------------------
FAQ Topic - Why do I get permission denied when accessing a
frame/window?
-----------------------------------------------------------------------

In the normal browser security model, a script may only access the
properties of documents served from the same domain or IP address,
protocol, and port.

Any attempt to access a property in such cases will result in a "Permission
Denied" error. Signed scripts or trusted ActiveX objects can
overcome this in limited situations.

<URL: http://msdn.microsoft.com/en-us/library/ms533028%28VS.85%29.aspx>
<URL: https://developer.mozilla.org/En/Same_origin_policy_for_JavaScript>


The complete comp.lang.javascript FAQ is at
http://jibbering.com/faq/

--

The sendings of these daily posts are proficiently hosted
by http://www.pair.com.

Gene Wirchenko

unread,
Feb 2, 2012, 3:21:48 PM2/2/12
to
On Thu, 02 Feb 2012 00:00:02 +0000, "FAQ server"
<javas...@dotinternet.be> wrote:

>-----------------------------------------------------------------------
>FAQ Topic - Why do I get permission denied when accessing a
>frame/window?
>-----------------------------------------------------------------------
>
>In the normal browser security model, a script may only access the
>properties of documents served from the same domain or IP address,
>protocol, and port.
>
>Any attempt to access a property in such cases will result in a "Permission
>Denied" error. Signed scripts or trusted ActiveX objects can
>overcome this in limited situations.
>
><URL: http://msdn.microsoft.com/en-us/library/ms533028%28VS.85%29.aspx>
><URL: https://developer.mozilla.org/En/Same_origin_policy_for_JavaScript>
>
>
>The complete comp.lang.javascript FAQ is at
>http://jibbering.com/faq/

I posted recently about getting this error due to the file
apparently being written to at the time. (I save the file in
Dreamweaver and then IMMEDIATELY test it.) Should this be added to
the answer above?

Sincerely,

Gene Wirchenko

Dr J R Stockton

unread,
Feb 3, 2012, 5:56:31 PM2/3/12
to
In comp.lang.javascript message <70sli7dgivd0in2v9vuebuqkj5kp8bha8s@4ax.
com>, Thu, 2 Feb 2012 12:21:48, Gene Wirchenko <ge...@ocis.net> posted:
>On Thu, 02 Feb 2012 00:00:02 +0000, "FAQ server"
><javas...@dotinternet.be> wrote:

>>FAQ Topic - Why do I get permission denied when accessing a
>>frame/window?

> I posted recently about getting this error due to the file
>apparently being written to at the time. (I save the file in
>Dreamweaver and then IMMEDIATELY test it.) Should this be added to
>the answer above?

Only if something about Chrome not reading files off the same local disc
is added.

GW for FAQ maintainer !

--
(c) John Stockton, nr London UK. ?@merlyn.demon.co.uk DOS 3.3 6.20 ; WinXP.
Web <http://www.merlyn.demon.co.uk/> - FAQqish topics, acronyms & links.
PAS EXE TXT ZIP via <http://www.merlyn.demon.co.uk/programs/00index.htm>
My DOS <http://www.merlyn.demon.co.uk/batfiles.htm> - also batprogs.htm.

Gene Wirchenko

unread,
Feb 6, 2012, 12:39:22 AM2/6/12
to
On Fri, 3 Feb 2012 22:56:31 +0000, Dr J R Stockton
<repl...@merlyn.demon.co.uk> wrote:

>In comp.lang.javascript message <70sli7dgivd0in2v9vuebuqkj5kp8bha8s@4ax.
>com>, Thu, 2 Feb 2012 12:21:48, Gene Wirchenko <ge...@ocis.net> posted:
>>On Thu, 02 Feb 2012 00:00:02 +0000, "FAQ server"
>><javas...@dotinternet.be> wrote:
>
>>>FAQ Topic - Why do I get permission denied when accessing a
>>>frame/window?
>
>> I posted recently about getting this error due to the file
>>apparently being written to at the time. (I save the file in
>>Dreamweaver and then IMMEDIATELY test it.) Should this be added to
>>the answer above?
>
>Only if something about Chrome not reading files off the same local disc
>is added.
>
>GW for FAQ maintainer !

No. I am much too ignorant of JavaScript to do it.

Sincerely,

Gene Wirchenko

Evertjan.

unread,
Feb 6, 2012, 6:24:36 AM2/6/12
to
We need one who is humble enough to admit to that.

And that is a faq!

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Gene Wirchenko

unread,
Feb 6, 2012, 2:29:59 PM2/6/12
to
On 06 Feb 2012 11:24:36 GMT, "Evertjan."
<exjxw.ha...@interxnl.net> wrote:

>Gene Wirchenko wrote on 06 feb 2012 in comp.lang.javascript:
>
>> On Fri, 3 Feb 2012 22:56:31 +0000, Dr J R Stockton
>> <repl...@merlyn.demon.co.uk> wrote:

[snip]

>>>GW for FAQ maintainer !
>>
>> No. I am much too ignorant of JavaScript to do it.
>
>We need one who is humble enough to admit to that.

While I know a lot more than I did not so long ago, I am still
somewhat in the shallow end with my flotation jacket and leery of the
dropoff.

>And that is a faq!

Is there no one who knows JavaScript well who could do it? I
would be fine submitting some suggestions (from my fairly newbie
perspective).

Sincerely,

Gene Wirchenko

Dr J R Stockton

unread,
Feb 7, 2012, 4:41:51 PM2/7/12
to
In comp.lang.javascript message <mba0j75b4c40f7lvccf8rvrb6ha71p7nds@4ax.
com>, Mon, 6 Feb 2012 11:29:59, Gene Wirchenko <ge...@ocis.net> posted:
The problem in the past has been that maintainers have known JavaScript
too well, while being relatively poor at communicating to the sort of
people who are needing help.

An example from my own experience as a newcomer : I asked about writing
to a page which was already being displayed. In those days, one might
need to use document.layers or document.all or document.getElementById,
for the general case of "labelling" and writing to a general location.

The then maintainer offered a complex piece of code which generated a
browser-dependent function to get a reference when called by another
function F expressed by a string; he said to use <div ID=anID></div> in
the HTML and F("anID", S) in the script to write string S into that div.

It worked, of course; and went into the FAQ; it is now simplified into
Section 9.4.

But it did not say, and 9.4 does not explicitly say, that the solution
to the task has two distinct consecutive parts - getting a reference to
the element, and setting the value` of the element. It did not
explicitly say that the solution could be used for most types of
container element. It did not mention that such a reference could be
obtained in other ways such as forms[3] or this.form.Btn1.

The two parts, separated but joinable, are far more widely useful than
the united code.


Now see <http://www.merlyn.demon.co.uk/js-faq-u.HTM#MaWP> ff.


--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME.
Web <http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036)
Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)

Evertjan.

unread,
Feb 8, 2012, 4:00:12 AM2/8/12
to
Dr J R Stockton wrote on 07 feb 2012 in comp.lang.javascript:

>>>We need one who is humble enough to admit to that.
>>
>> While I know a lot more than I did not so long ago, I am still
>>somewhat in the shallow end with my flotation jacket and leery of the
>>dropoff.
>>
>>>And that is a faq!
>>
>> Is there no one who knows JavaScript well who could do it? I
>>would be fine submitting some suggestions (from my fairly newbie
>>perspective).
>
>
> The problem in the past has been that maintainers have known JavaScript
> too well, while being relatively poor at communicating to the sort of
> people who are needing help.

Can we agree that being an js-expert is not necessary and sometimes even
counterproductive for the job?
0 new messages