473,399 Members | 4,177 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Safari issue with self.close

Hi,

I have a page that has a button "Exit and Close", which closes the
popup window that it has opened. This works fine under IE, NN, FF and
Opera but not Safari. Any ideas why? I even tried checking the
self.name property and this is returned blank in Safari. Any help
would be appreciated.

Cheers

Feb 28 '07 #1
7 10477
al******@gmail.com wrote:
Hi,

I have a page that has a button "Exit and Close", which closes the
popup window that it has opened. This works fine under IE, NN, FF and
Opera but not Safari. Any ideas why? I even tried checking the
self.name property and this is returned blank in Safari. Any help
would be appreciated.
Did you try window.close()?
Feb 28 '07 #2
On Feb 28, 2:31 pm, Harlan Messinger
<hmessinger.removet...@comcast.netwrote:
Did you try window.close()?
Yeah, same problem. Thing is that the self.close() seems to work on
some pages but not others......no idea why!?


Feb 28 '07 #3
al******@gmail.com wrote:
Thing is that the self.close() seems to work on
some pages but not others......no idea why!?
Don't know about Safari, but last time I tested many browsers would not
allow window closure via script if the window had any history. Maybe
this would explain the discrepancy?

Osmo
Mar 1 '07 #4
On Mar 1, 5:08 am, Osmo Saarikumpu <o...@weppipakki.comwrote:
Don't know about Safari, but last time I tested many browsers would not
allow window closure via script if the window had any history. Maybe
this would explain the discrepancy?
Thats interesting, but I checked it out and the other windows that
would close also have a history, so I guess thats not it.
Mar 1 '07 #5
On Mar 1, 5:08 am, Osmo Saarikumpu <o...@weppipakki.comwrote:Don't know about Safari, but last time I tested many browsers would not
allow window closure via script if the window had any history. Maybe
this would explain the discrepancy?
Funny, adding the window-features property did the trick....window-
features="menubar=no,scrollbars=yes,resizable=yes, width=700,height=450"
anyone know why this would happen?

Mar 1 '07 #6
al******@gmail.com wrote:
>On Mar 1, 5:08 am, Osmo Saarikumpu <o...@weppipakki.comwrote:Don't know about Safari, but last time I tested many browsers would not
allow window closure via script if the window had any history. Maybe
this would explain the discrepancy?

Funny, adding the window-features property did the trick....window-
features="menubar=no,scrollbars=yes,resizable=yes, width=700,height=450"
anyone know why this would happen?
Perhaps to keep malicious websites from closing windows that don't
"belong" to them, Safari doesn't let scripts close "ordinary" browser
windows opened without any special configuration parameters, but
considers windows opened with feature specifications to be special
windows that "belong" to the app and that the script is entitled to
close. This would extend further the protection offered by other
browsers that won't honor window.close() on a browser that was opened by
the user instead of by script.
Mar 1 '07 #7
al******@gmail.com wrote :
On Feb 28, 2:31 pm, Harlan Messinger
<hmessinger.removet...@comcast.netwrote:
>Did you try window.close()?

Yeah, same problem. Thing is that the self.close() seems to work on
some pages but not others......no idea why!?
New windows not opened by javascript can not as a rule be closed by
JavaScript.
http://developer.mozilla.org/en/docs...indow.open#FAQ

dom.allow_scripts_to_close_windows
False (default): Only windows opened via script may be closed via close().
http://kb.mozillazine.org/about:config_entries#DOM..2A

Gérard
--
Using Web Standards in your Web Pages (Updated Dec. 2006)
http://developer.mozilla.org/en/docs...your_Web_Pages
Mar 4 '07 #8

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

Similar topics

3
by: Marcia Gulesian | last post by:
The following code works in I.E. (PC) but not Safari (Mac) window.opener=self; window.close(); What code will close the page when it runs in Safari?
4
by: metoikos | last post by:
I've scoured the web (clumsily, I'm sure) for information on the difficulties I am having, checked my markup in validators, and had a friend with more CSS clue look over it, but I haven't had any...
1
by: Limbo | last post by:
Hi, Using the following code to fill a specific text box on a form with an image file name. The code is called from a pop up window, fills a text box on the partent window and then the pop up...
3
by: Will Hartung | last post by:
Hi all, I seem to be having an issue color matching between the cut up graphic pieces and the block fill background colors on a Mac iBook running Safari. Simply put, while the color are...
2
by: gokhvat | last post by:
I am experiencing a strange cross-platform issue with my python program. I am using wxRadioBox to create radio buttons. When I run the python code on a mac, everything works perfectly, but not...
5
by: =?gb2312?B?yMvR1MLkyNXKx8zs0cSjrM37vKvM7NHEsru8+7z | last post by:
I wanna print the log to both the screen and file, so I simulatered a 'tee' class Tee(file): def __init__(self, name, mode): file.__init__(self, name, mode) self.stdout = sys.stdout...
3
by: Brad | last post by:
I have an aspx page that is sending pdf files to client browsers: it uses a filestream to read the pdf file and response.binarywrite to send content to the browser. This has worked great for years...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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...

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.