473,406 Members | 2,273 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,406 software developers and data experts.

meaning of statement "window.opener = top;"

When I do the following, the mycode will still execute. The reason I put
window.opener=top; is to disable the close confirmation dialog box.

window.opener = top;
window.close();
//mycode...

But if I do the following without statement window.opener = top;

window.close();
//mycode...

Then mycode will not be executed.

any ideas why? please advise. thanks!!
Jul 23 '05 #1
6 5240
Matt wrote:
When I do the following, the mycode will still execute. The reason I put
window.opener=top; is to disable the close confirmation dialog box.
It is using a security bug in some UAs and manipulating the
environment of the user is at least considered bad style.
[...]
But if I do the following without statement window.opener = top;

window.close();
//mycode...

Then mycode will not be executed.

any ideas why?
Because you close the window and thus the global context ends.
please advise. thanks!!


RTFM, RTFFAQ.
PointedEars
Jul 23 '05 #2
Thomas wrote:
Matt wrote:
When I do the following, the mycode will still execute. The reason I put
window.opener=top; is to disable the close confirmation dialog box.


It is using a security bug in some UAs and manipulating the
environment of the user is at least considered bad style.


so do you have some good suggestions? Please advise. thanks!!
Jul 23 '05 #3
Matt wrote:
Thomas wrote:
Matt wrote:
> When I do the following, the mycode will still execute. The reason I put
> window.opener=top; is to disable the close confirmation dialog box.


It is using a security bug in some UAs and manipulating the
environment of the user is at least considered bad style.


so do you have some good suggestions? Please advise. thanks!!


Why should I support bad style? Why should I help with what can be
considered breaking a law in some countries? Can you tell me that?
PointedEars
Jul 23 '05 #4
jr********@hotmail.com (Matt) wrote in message news:<ba*************************@posting.google.c om>...
When I do the following, the mycode will still execute. The reason I put
window.opener=top; is to disable the close confirmation dialog box.

window.opener = top;
window.close();
//mycode...

But if I do the following without statement window.opener = top;

window.close();
//mycode...

Then mycode will not be executed.

any ideas why? please advise. thanks!!

Matt, I might not be able to solve your problem, but i thank you
for solving mine! The user was annoyed at the close confirmation box,
and you just gave me a way of eliminating it. We're strictly an IE
shop here, so hopefully it will work fine in production.

As for this Big Ears guy, who thinks he knows exactly what every
single user in existence needs and wants, maybe he should tell my user
what he "really" wants and needs. People like him did great damage to
our industry with his pompous and condescending attitude. The
industry and this newsgroup can certainly benefit by his absence.
Jul 23 '05 #5
bruce wrote:
jr********@hotmail.com (Matt) wrote in message news:<ba*************************@posting.google.c om>...
When I do the following, the mycode will still execute. The reason I put
window.opener=top; is to disable the close confirmation dialog box.

window.opener = top;
window.close();
//mycode...

But if I do the following without statement window.opener = top;

window.close();
//mycode...

Then mycode will not be executed.

any ideas why? please advise. thanks!!
Matt, I might not be able to solve your problem, but i thank you
for solving mine! The user was annoyed at the close confirmation box,
and you just gave me a way of eliminating it. We're strictly an IE
shop here, so hopefully it will work fine in production.


It will work fine until Microsoft decides to fix the bug that allows the code to work. At which point it
will simply stop working, and you'll be left wondering why and scrambling to figure out how to "work around
it".
As for this Big Ears guy, who thinks he knows exactly what every
single user in existence needs and wants, maybe he should tell my user
what he "really" wants and needs. People like him did great damage to
our industry with his pompous and condescending attitude. The
industry and this newsgroup can certainly benefit by his absence.


Maybe you should explain the limitations of Web-based applications more clearly to your user, explain that
you don't have the same level of control over the client software as you do using other technologies, then
produce a solution that is both acceptable to your client, and does not involve a hack that could
potentially disappear with any security patch or upgrade for IE that is released.

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq

Jul 23 '05 #6
bruce wrote:
[...]
As for this Big Ears guy,
You do not have any sound arguments, so you think you are required
to insult people you do not even know, and you think that distorting
a nickname would be appropriate. Or maybe you do not think at all,
I do not know and I care less.
who thinks he knows exactly what every single user in existence needs
and wants, maybe he should tell my user what he "really" wants and needs.
People like him did great damage to our industry with his pompous and
condescending attitude. The industry and this newsgroup can certainly
benefit by his absence.


You have not the slightest clue what nonsense you have written, but
you may still find out searching this newsgroup for numerous arguments
about this topic and similar ones, where not only I participated but
also other subscribers. As for your customer who most certainly wants
to provide services to other users, but also wants the confirmation
box which is in fact an important security feature that prevents users
from losing their history and control over their software, removed,
I give you and him/her one more advice to think about:

The fish must eat the worm, not the fisher.
PointedEars, Score adjusted
Jul 23 '05 #7

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

Similar topics

4
by: Flapper | last post by:
Help please, Have a situation when converting from Oracle SP's to SQL SP's. The old oracle cursor was roughly as follows CURSOR cur_rsStock IS select * from (select StockRowId, CategoryId
3
by: Shiperton Henethe | last post by:
Hi Can anyone tell me how to open up a new normal, full-sized browser window from a small popup window? I'm using something like this. <script language="javascript"> <!--
3
by: JohnEGee | last post by:
Hello, all, and TIA for any help you can offer. I've searched the Internet for answers and have finally come here. I've created a page (several, actually) with a link that opens a pop-up...
6
by: Martijn Coppoolse | last post by:
Hello everyone, I've got two little apps which are able to create a window that displays something on the desktop, but are not clickable. Instead, when you click on the window, the item...
2
by: Kevin Frey | last post by:
We have a web application that, for the purposes of reporting, launches a new window to display the contents of the report in (PDF format). This is implemented using a custom IHttpHandler...
4
by: arajunk | last post by:
In Firefox this opens a full size window (maximized) . In IE it opens the partial window requiring user to click restore (upper right) to maximize. What am I missing ? var...
4
by: jodleren | last post by:
Hi all I have a file I open in a smaller window, like this: <a href="#" onclick="window.open.... but it also causes the main window to jump to the top. What have people done to avoid that?...
6
by: Prisoner at War | last post by:
Okay, no such thing, apparently, in the DOM.... How am I supposed to tell JavaScript "turn the whole page opaque"? Is there a "JavaScript/CSS dictionary" and a "JavaScript/CSS grammar" about??...
24
by: Jeremy J Starcher | last post by:
While reading c.l.j, I've noticed that some people prefer and indeed even recommend the use of "window.alert()" over "alert()". I can't find any technical reason to make this distinction, and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
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
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
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
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,...
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.