|
Hi....
Here's
a suggestion. Obviously, you expect JAVASCRIPT to be available and working
on the machines your users are using.
As you
note, there doesn't seem to be anyway to prevent users from actually closing the
main window. What you could do, however,
is to
warn them, when the sub windows are first opened, that those windows will not
function unless the main window is still open.
In the
subwindows, just have an onclick handler for all the submit buttons which checks
to ensure that the main window is open before the
submit
is actually done. If the main window has been closed, the user could be
told that since the main window is closed, the sub-window is
no
longer valid.
Actually, you probably want to go a step further, and
generate, using JAVAScript, a random identifier string for the parent
windows. This
identifier can be grabbed by the child windows on
startup, so that if the user should close the parent window, and then attempt to
fix the
problem by reopening it, you will still be able to
correctly identify that a close event had occurred.
Does
this make sense?
-AMT
May be
I was not clear enough before, I am using JavaScript to open those windows.
They are forms that are being read from an Oracle database. You have the
option to modify the content of those forms.
On the
main window, you have a list of products, by clicking on any product, a window
opens up that contains the general info about that product.
You can choose to modify the contents of that window, for example the phone
number of the supplier and then you click on a validate button to write the
modified data back to the data base and the window closes automatically. One
problem that may arise here is if the user decided to close the main window,
before closing the general info window. This will cause data loss. How can I
worn or prevent the user from closing the main window before closing the child
of that window!!
To add to the complexity of things, the general
Info child window has a More Info button that open up yet
another (third) child window, and in that window you can also modify it's
contents. So now I need to prevent (or worn) the users from closing the Main
Window or the general Info Window, before closing the More Info window.
I am not sure if there is a solution for this,
especially that we have 'x' on the right side of the title bar that users find
very convenient to shut down windows by!!!
I've been looking for a solution for this for
quite some time, if any one can suggest a solution it would be greatly
appreciated.
-----Original
Message----- From: A mailing list about Java Server Pages
specification and reference [mailto:[EMAIL PROTECTED]]On
Behalf Of SoftLiban ZAKHARIA Michael Sent: Thursday, January 06,
2000 5:40 AM To: [EMAIL PROTECTED] Subject:
Closing Windows in the right sequence
Happy New Year
All,
I am facing a problem with
controlling the close of my pop up windows on the internet. I am opening a
sequence of window up to 4 of them, and I must close them in the reverse
sequence of opening them. And I need for this to work on both IE and
Communicator!!
I'm not asking for much, am I. ;-)
Any response that could set me in the right
direction would be greatly appreciated.
Thanks in
advance.
|