473,796 Members | 2,536 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Accessing the window object - problems with Internet Explorer

2 New Member
I wonder if anyone has had problems with the above recently and has managed to solve them.

I have opened a new window using window.open which performs as would be expected in both IE and Firefox, but when I then want to close the window using window.close, IE just throws an error message "Permission denied".

On further investigation I found that IE threw out this message with window.focus() and window.name even though this did not cause a problem in Firefox.

Any ideas would be very gratefully received.

Function is shown below for further information (NewWin being the url of the .pdf I wish to open):
Expand|Select|Wrap|Line Numbers
  1. function F_OpenPDFWindow(NewWin)
  2. {
  3.     if(PDF_PopUp!=undefined)
  4.     {
  5.         PDF_PopUp.close();
  6.     }
  7.     var PageContent=NewWin;
  8.     PDF_PopUp = window.open(PageContent, "pdfWindow","width=750,left=30,top=40,scrollbars");
  9. }
  10.  
Oct 30 '06 #1
2 2760
iam_clint
1,208 Recognized Expert Top Contributor
Expand|Select|Wrap|Line Numbers
  1. function closewin() {
  2. window.open('','_parent','');
  3. win = top;
  4. win.opener = top;
  5. window.close();
  6. }
  7.  
use this code in the popup window itself then call the function when you want it to close. This code will close the window without confirmation.
Oct 30 '06 #2
Sal
2 New Member
Expand|Select|Wrap|Line Numbers
  1. function closewin() {
  2. window.open('','_parent','');
  3. win = top;
  4. win.opener = top;
  5. window.close();
  6. }
  7.  
use this code in the popup window itself then call the function when you want it to close. This code will close the window without confirmation.

Thanks for this, I will give it a try and report back.

Sal
Oct 31 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
20549
by: Michael | last post by:
I am trying to allow a user to view a PDF in a new window. I currently have this working using the following: <a href="./pdf.do?parameter=01121980" target="top"><b>pdf</b></a> The problem with the above solution is the back/forward buttons and all the other browser options. Because of this, I am trying to get the following solution to work: <a href="#" onclick="popUp('./pdf.do?parameter=01121980')"><b>pdf</b></a>
13
9462
by: Kai Grossjohann | last post by:
It seems that Ctrl-N in Mozilla opens a new empty browser window. That's fine, I don't need to do anything about it. But Ctrl-N in IE appears to clone the current window. Is there a way to intercept the key so that I can do stuff on the server side to make the new window behave correctly? (We have a JSP-based webapp which stores state in the session. Now if two windows access (and modify!) the same session, then madness will result....
18
2500
by: Andrew Poulos | last post by:
If I manage to call the following bit of javascript in IE and MZ w = window.open("", "s", 'status=no,resizable=no,width=450,height=450'); I get a window that is not resizable and without a statusbar. Yet FF gives me both a statusbar and the window is resizable! Does this mean that FF does not support these "features" or is there a different way to code them for FF?
5
1739
by: Helen | last post by:
Hi, I am trying to write an ASP.Net application that integrates with a third party application via their fairly simplistic web component, however I am having problems with the URI. The URI works fine in Internet Explorer, and returns the information from the third party application to the browser, which is displayed, no problems.
3
1408
by: Martin | last post by:
Hi I am attempting to write a small application that will allow users to manage the AddressBar entries within Internet Explorer. The typed URLs in the AddressBar can be found at HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TypedURLs and I have successfully managed to get this list via a Windows C# .NET app with the following code : public Form1()
7
2867
by: MrFez | last post by:
Through some investigation it appears that selecting "Every visit to the page" for the IE caching setting "Check for new version of stored pages" causes the window.opener property of child windows to be set to null after the main page has excuted a postback. Can anyone explain this or at show that I'm wrong ? Is this a bug in IE ?
3
3174
by: Daniel Liberman | last post by:
Hi, everyone. That's my environment: - I have a pocket pc (iPAQ h4350) application developed with VSNET2003/C# that has a SQL Server CE Database, running. That's working fine. Obs: the pocket is NOT supposed to have a wireless conection available. - I have an access database on a standalone desktop running Windows XP, i.e., there is NO guaranteed network connection available. - I've developed a webservice with VSNET2003/C# too to do...
21
18179
by: alistair_henderson | last post by:
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...
8
2684
by: mumpi | last post by:
From a documentlist the user activates links to see the document in a popup. The link (JSP): <a href='javascript:var w=windowOpenDok("${docURLPDFFromTiff}","document",0.5,0.8);w.focus();'> The function: function windowOpenDok (url,name,relWidth,relHeight) {
0
9680
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
10456
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10230
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10012
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...
1
7548
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
6788
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
5575
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4118
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
3
2926
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.