473,485 Members | 1,393 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Popup window not closing using window.close

219 New Member
I can't seem to get my popup windows to close properly in IE. They close fine in Firefox. Any suggestions on what I should try?

Expand|Select|Wrap|Line Numbers
  1. <a href="#" onClick="javascript:window.close();">close window</a>
  2.  
I've tried window.close(self) as well, but that's not working either
Jul 28 '08 #1
7 4927
acoder
16,027 Recognized Expert Moderator MVP
You don't need the "javascript:" part. window.close() should work. So does it just not work or can you see any errors too?
Jul 29 '08 #2
dmorand
219 New Member
You don't need the "javascript:" part. window.close() should work. So does it just not work or can you see any errors too?
I removed the javascript part, but still nothing. It works in Firefox, just not IE. I'm not getting any errors in the statusbar.
Jul 29 '08 #3
dmorand
219 New Member
I removed the javascript part, but still nothing. It works in Firefox, just not IE. I'm not getting any errors in the statusbar.
Actually I take it back. It works in IE6, just not IE7.
Jul 29 '08 #4
acoder
16,027 Recognized Expert Moderator MVP
Can you produce a small version of your code that demonstrates the problem?
Jul 29 '08 #5
dmorand
219 New Member
Can you produce a small version of your code that demonstrates the problem?
I think it has to do with the popup windows and how I'm opening them, not sure though.

Here is some of the code:

Expand|Select|Wrap|Line Numbers
  1. ***** index.cfm code portion *****
  2. <cfif session.access eq 'admin'>
  3.                 <li><a href="##" onclick="popup('emulation.cfm',140,500,'emulation');">Emulation</a></li>
  4.                 <li><a href="##" onclick="alert('Under Development');">Administration</a></li>
  5.             </cfif>
  6.  
  7. ***** emulation.cfm code portion  *****
  8. <a href="#" onclick="window.close();">close window</a>
  9.  
  10. ***** javascript popup function *****
  11. function popup(url,height,width,mywindow,scrollbars){
  12.     params="height=" + height + ",width=" + width + ",scrollbars=" + scrollbars + ",status=1";
  13.     window.open(url,mywindow,params);
  14. }
  15.  
Jul 29 '08 #6
dmorand
219 New Member
It might be the system I'm testing on. I just opened the page on another computer, and all of the popup windows close with no problem.....hmmmmm
Jul 29 '08 #7
acoder
16,027 Recognized Expert Moderator MVP
Check your browser settings then.
Jul 29 '08 #8

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

Similar topics

2
4346
by: Moon | last post by:
Seems I still haven't got the hang of all those window generating code in Javascript. I've got a page with about 15 photo thumbnails. When you click on a thumbnail a new window pops up which shows...
1
2433
by: MJEASSOC | last post by:
I need some help with closing a popup window. I'm making an online portfolio, that has one base page with text and thumbnails. When a user clicks on a thumb, a new window opens containing a larger...
4
5643
by: Colin Graham | last post by:
Hi guys, Just a quickie here that i hope someone can help me with. Basically i want stop the user from closing the popup window using the small x button in the top right hand corner. Im aware...
7
3194
by: E Michael Brandt | last post by:
I have been lurking here for some time, and now would like to ask a question of you clever coders: My JustSo PictureWindow 3 Extension for Dreamweaver has stumbled in the face of the new Opera...
13
6239
by: ldan | last post by:
Hi everybody, I would not consider myself an expert in javascript - but so far whatever I know, helped me reaching my goals. Recently I started to experience a lot of javascript errors related...
4
34828
by: GrantS | last post by:
I am having a problem closing a popup window opened modally. When I try to close the window (when the user hits save button and the data has been processed), the Popup window opens as a full screen...
7
2583
by: Drew Berkemeyer | last post by:
Hello, We have an application that we have written using ASP.NET. On one of our pages we open a popup window using javascript. The popup window has a save and a cancel button. Both of them are...
11
7318
by: Alex.Svetos | last post by:
Hello, I'm trying to get a popup to keep focus when it is re-clicked. The script below is supposed to produce this exact behaviour, however it doesn't work, at least on firefox 1.0.7 and moz...
3
1921
by: =?Utf-8?B?Vk1J?= | last post by:
How can I close popup window automatically when I close the parent window (the application itself)? Thanks.
3
7351
by: Jimmy | last post by:
It is also possible for popup window to call function in main window by using the opener property. Will "opener.someFunctionInMain(param1, param2)" in the popup window work? It's possible for...
0
6960
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7116
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,...
0
7161
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...
1
6825
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
4857
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...
0
4551
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...
0
3058
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3063
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1376
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 ...

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.