473,728 Members | 1,940 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Permission Denied when accessing window.closed

Morning All,

I have some code for a website which uses 'window.open' to simulate
modal dialog boxes. I use the window.closed property to decide if the
window object exists at various points. This has been fine until last
week when I started getting javascript 'Permission Denied' errors when
I try to access this property.

I suspect that a windows update has caused this somehow, as this code
has not changed for a very long time. Can anyone confirm if there have
been any windows updates that would cause this? Maybe some browser
security settings have subtely changed, or something?

Its not a huge problem, as I already had my own 'closed' flag to check
as window.closed was not reliable in IE5 anyway, so I may just stop
using window.closed entirely. I would like to be abel to explain the
sudden appearance of the error, though..

Thanks,
Alistair.

Aug 14 '06 #1
21 18173
I am encountering the same thing and I found that when I removed a
recent windows update, Cumulative Security Update for Internet Explorer
for Windows XP (KB918899), the issue went away. Of course, that is not
an option I can present to our clients.

In my scenario the error is being thrown when I check the window.closed
property for a pop-up in a timer interval loop. After the pop-up is
reported as closed the opener then runs a function using the data from
the pop-up.

Playing with the javascript I found that if I delayed checking the
closed property for about 1 second then the closed property reported
back correctly that it was closed. Also, before the pop-up was closed
the property correctly reported back that the window was not closed.

I use this routine,
if (dialog && !dialog.closed) dialog.focus();
in many places to make my pop-ups behave somewhat like a modal dialog
and I would love to hear if there is a security setting or other option
available to avoid the Permission Denied error now that it has become
an issue within IE 6.0.29.

Any insights would be appreciated. Thanks,
James

al************* ***@email.com wrote:
Morning All,

I have some code for a website which uses 'window.open' to simulate
modal dialog boxes. I use the window.closed property to decide if the
window object exists at various points. This has been fine until last
week when I started getting javascript 'Permission Denied' errors when
I try to access this property.

I suspect that a windows update has caused this somehow, as this code
has not changed for a very long time. Can anyone confirm if there have
been any windows updates that would cause this? Maybe some browser
security settings have subtely changed, or something?

Its not a huge problem, as I already had my own 'closed' flag to check
as window.closed was not reliable in IE5 anyway, so I may just stop
using window.closed entirely. I would like to be abel to explain the
sudden appearance of the error, though..

Thanks,
Alistair.
Aug 14 '06 #2
James,

Thanks for that information - I can confirm that if I remove KB918899
then the problem goes away. As you say, try suggesting that to a
client! I do pretty much the same as you describe, except that I have
an object which encapsulates the window object and already have a
'closed' flag on that object as the window.closed was not being
reported correctly in IE5. I think I may stop using the window.closed
and just rely on my own flag instead.

Thanks,
Al.

ja************* *@gmail.com wrote:
I am encountering the same thing and I found that when I removed a
recent windows update, Cumulative Security Update for Internet Explorer
for Windows XP (KB918899), the issue went away. Of course, that is not
an option I can present to our clients.

In my scenario the error is being thrown when I check the window.closed
property for a pop-up in a timer interval loop. After the pop-up is
reported as closed the opener then runs a function using the data from
the pop-up.

Playing with the javascript I found that if I delayed checking the
closed property for about 1 second then the closed property reported
back correctly that it was closed. Also, before the pop-up was closed
the property correctly reported back that the window was not closed.

I use this routine,
if (dialog && !dialog.closed) dialog.focus();
in many places to make my pop-ups behave somewhat like a modal dialog
and I would love to hear if there is a security setting or other option
available to avoid the Permission Denied error now that it has become
an issue within IE 6.0.29.

Any insights would be appreciated. Thanks,
James

al************* ***@email.com wrote:
Morning All,

I have some code for a website which uses 'window.open' to simulate
modal dialog boxes. I use the window.closed property to decide if the
window object exists at various points. This has been fine until last
week when I started getting javascript 'Permission Denied' errors when
I try to access this property.

I suspect that a windows update has caused this somehow, as this code
has not changed for a very long time. Can anyone confirm if there have
been any windows updates that would cause this? Maybe some browser
security settings have subtely changed, or something?

Its not a huge problem, as I already had my own 'closed' flag to check
as window.closed was not reliable in IE5 anyway, so I may just stop
using window.closed entirely. I would like to be abel to explain the
sudden appearance of the error, though..

Thanks,
Alistair.
Aug 15 '06 #3
Hi All,

I am having same problem in my application. Please let me if you work
auornd some to approach to fix the IE Issue.

We are using folllowing code in our application -
function _closeStatusWin dow()
{
if(g_statusWind ow && !g_statusWindow .closed)
g_statusWindow. close();
}

Thanks in Advanace,
Ramesh

Aug 18 '06 #4
Same here... I confirmed that KB918899 caused this problem.
I used a pop-up dialog to get data...
When I click on OK button, and eventually will close the dialog... when
the code try to access the data, it said "permission denied".

Here is the function I handle the ok button clicked, the data look fine
in here:
function okBtn()
{
outputArgs.newL ist =
copyArray(docum ent.entityDialo gForm.curSel.op tions);
top.close(); <--- to close the dialog.
}

but when I get the data else where.. it will "permission denied".
I heard that someone said delay the close dialog will work.. How is
this work? Can someone share some lights here... ???

Any suggestions out there?
Thanks.

Aug 21 '06 #5
bo*******@gmail .com wrote:
Same here... I confirmed that KB918899 caused this
problem.
I used a pop-up dialog to ...
<snip>
Any suggestions out there?
For at least the last 4 years it has been commonly recommended on this
group (and a fair few other web development related technical Usenet
groups) that people not design Internet and Intranet systems that depend
on the ability to open new browser windows. There have of course been
plenty of people who knew better, insisted the opening new browser
windows as necessary, desirable, useful, etc., and went ahead and
created such systems. Meanwhile the people who paid attention and
understood why opening new browser windows was rapidly becoming
non-viable set about investigating how the achieve similar results
without them.

The practical upshot of this is that there will not be much interest in
solving problems arising with the opening of new browser windows among
the people most qualified to tackle the subject, as the more
interested/considerate javascript authors no longer face those problems.

Richard.

Aug 21 '06 #6
Richard Cornford wrote:
The practical upshot of this is that there will not be much interest in
solving problems arising with the opening of new browser windows among
the people most qualified to tackle the subject, as the more
interested/considerate javascript authors no longer face those problems.
What does one do when a client, for whom you work as a maintenance
programmer, asks you to remedy the following:
- a very, very expensive LMS can no longer open e-learning courses
because pop-up blockers are (rightly) in place,
- Flash 8 no longer communicates with JavaScript, in locally installed
courses, because of "new" security precautions in Flash,
- IE 7 and FF do not allow the hiding of the address and status bars
thus "ruining" carefully crafted designs?

The replies I've received, after I politely explain how the world now
works, are usually along the lines of:
- we've paid you to solve our problems
- it's been working for years
- no, we won't change security restrictions
- you are most likely incompetent
Andrew Poulos
Aug 22 '06 #7
Richard Cornford wrote:
For at least the last 4 years it has been commonly recommended on this
group (and a fair few other web development related technical Usenet
groups) that people not design Internet and Intranet systems that depend
on the ability to open new browser windows. There have of course been
plenty of people who knew better, insisted the opening new browser
windows as necessary, desirable, useful, etc., and went ahead and
created such systems. Meanwhile the people who paid attention and
understood why opening new browser windows was rapidly becoming
non-viable set about investigating how the achieve similar results
without them.
Right, but what do you do when it IS necessary to open new windows? Ask
all your users to accept popups from your site?

I'm developing an interactive map, where the user can click on the map
to open related "applicatio ns" (as in another webpage with forms and
javascript (including XMLHttpRequest) ). Many of these applications will
require a considerable portion of the screen, and it's also desirable
that it's possible to continue using the map.

A floating DIV (perhaps with an iframe) with minimize-functionality gets
fairly close to what I need, but a new window works a lot better, IMO.

--
Trond Michelsen
Aug 22 '06 #8
Trond Michelsen wrote:
Richard Cornford wrote:
>For at least the last 4 years it has been commonly recommended
on this group (and a fair few other web development related
technical Usenet groups) that people not design Internet and
Intranet systems that depend on the ability to open new browser
windows. ...

Right, but what do you do when it IS necessary to open new
windows?
<snip>

It is not necessary, which is a good thing as it is not practical.

Richard.
Aug 22 '06 #9
Andrew Poulos wrote:
Richard Cornford wrote:
>The practical upshot of this is that there will not be much
interest in solving problems arising with the opening of new
browser windows among the people most qualified to tackle the
subject, as the more interested/considerate javascript authors
no longer face those problems.
What does one do when a client, for whom you work as a maintenance
programmer, asks you to remedy the following:
- a very, very expensive LMS can no longer open e-learning courses
because pop-up blockers are (rightly) in place,
- Flash 8 no longer communicates with JavaScript, in locally
installed courses, because of "new" security precautions in Flash,
- IE 7 and FF do not allow the hiding of the address and status
bars thus "ruining" carefully crafted designs?
If the system was based on fundamentally flawed design there is a limit
to what can be achieved by tinkering with it. At some point someone is
going to have to re-design the system so that it can work (and not
repeat the mistakes of the past so it will continue to work in the
future).
The replies I've received, after I politely explain how the
world now works, are usually along the lines of:
- we've paid you to solve our problems
So let them pay you to re-design the system in a way that is likely to
be reliable in the long term. (assuming you can).
- it's been working for years
It has actually been failing for years, but the rate of failure has been
increasing over time and is only now getting to the point where it is
obvious to the non-technically informed.
- no, we won't change security restrictions
That is completely reasonable. An appropriate design should not raise
unmanageable security issues.
- you are most likely incompetent
Well ... the questions you have been asking here over the last months
would not encourage me to believe that you were qualified to work as a
'maintenance programmer' on anything but the simplest of web site.
Though from what you say above it looks like some charlatan took the
money and ran, leaving you with a task that would be impossible for
anyone.

Richard.
Aug 22 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
10033
by: johkar | last post by:
My child window has this script. "temp" is simply the value of the select list which I am passing onchange. I get a permission denied error in IE when executing selectOption. function selectOption(temp){ if(temp == ''){ alert('You have not made a selection. Please make a selection to continue.'); return false; }
3
6142
by: fniles | last post by:
In our ASP page, we call XMLHttp to download XML files. When calling our page using localhost (localhost/myWebSite/myPage.htm), it works, but when calling using the IP address of the web server (xx.x.x.xxx/myWebSite/myPage.htm), I got "Permission denied" error in the HTTP.Open statement. Set http = CreateObject("Microsoft.XmlHttp") http.open "Get", "http://" & "xx.x.x.xxx" & "/XMLFiles/N-1min.xml", ALSE --> permission denied error
3
6963
by: meranganathan | last post by:
Hi friends, I would feel very thankful if someone has answer to this question. I have a window and from that i open up a popup and when i call the popup both the popup and the parent should be closed. So i wrote a methos in the opener window itself which { if(popupWindow!=null) popupWindow.close(); self.close(); }
0
8904
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9135
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8133
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6718
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6013
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4793
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3236
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2668
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2161
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.