473,385 Members | 1,487 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,385 software developers and data experts.

Control over IE Window Closure

Oxy
Dear all,

I am currently strungling with the fact that I want to control the
browser closure. In fact, I have a webbased application in which I use
a wizard. Ones the wizard starts, a lock is set on specific objects in
the db. On all pages of the wizard, the user get the possibility to
exit the wizard by clicking on a custom "Exit" button. That way, I know
that the user has left the wizard and that way I can unlock the locked
objects in the db again.

So far, so good. But users are used to close browser windows by
clicking on the "X" in the titlebar. If they close a window that way,
the locks aren't unset and no other user may start the wizard again. If
I should know that he had clicked on the "X", I could unlock the
objects.

I have searched a lot on the net but all results aren't sufficient for
me.

Some solutions which don't work:
1) onunload event: =Also called when the window is refreshed or
forwarded.
2) "titlebar = no" property while opening the first page of the wizard,
is not working (the titlebar is still enabled). And even then, the
users can close the window by clicking CRL-F4. This key combination
isn't disabled by the "hotkeys = no" property.

! Note: if the client's pc crashes or if the user kills the wizard
process via the task manager (exceptional cases), they have to call
maintenance to reset the locks. This is a requirement, defined by
bussiness.

Could somebody help me?

Thanks in advance,
Wesley.

Oct 31 '06 #1
4 1302

Oxy написав:
Dear all,

I am currently strungling with the fact that I want to control the
browser closure. In fact, I have a webbased application in which I use
a wizard. Ones the wizard starts, a lock is set on specific objects in
the db. On all pages of the wizard, the user get the possibility to
exit the wizard by clicking on a custom "Exit" button. That way, I know
that the user has left the wizard and that way I can unlock the locked
objects in the db again.

So far, so good. But users are used to close browser windows by
clicking on the "X" in the titlebar. If they close a window that way,
the locks aren't unset and no other user may start the wizard again. If
I should know that he had clicked on the "X", I could unlock the
objects.

I have searched a lot on the net but all results aren't sufficient for
me.

Some solutions which don't work:
1) onunload event: =Also called when the window is refreshed or
forwarded.
2) "titlebar = no" property while opening the first page of the wizard,
is not working (the titlebar is still enabled). And even then, the
users can close the window by clicking CRL-F4. This key combination
isn't disabled by the "hotkeys = no" property.

! Note: if the client's pc crashes or if the user kills the wizard
process via the task manager (exceptional cases), they have to call
maintenance to reset the locks. This is a requirement, defined by
bussiness.

Could somebody help me?

Thanks in advance,
Wesley.
Save the data that collected during wizard in a temporary storage (for
example, Session in ASP.Net) and write it to db if only wizard is
succesfully finished.

Oct 31 '06 #2
Oxy
It's not really a matter of writing data to the db. If I would adapt
your suggestion on my problematic, then I should lock the objects in
the db when finishing the wizard, but that is not what is required.
When somebody starts the wizard some objects must be locked in order
that other processes may not use these objects until they are unlocked
again (by finishing the wizard).

Is this a bit clear?

marss schreef:
Oxy написав:
Dear all,

I am currently strungling with the fact that I want to control the
browser closure. In fact, I have a webbased application in which I use
a wizard. Ones the wizard starts, a lock is set on specific objects in
the db. On all pages of the wizard, the user get the possibility to
exit the wizard by clicking on a custom "Exit" button. That way, I know
that the user has left the wizard and that way I can unlock the locked
objects in the db again.

So far, so good. But users are used to close browser windows by
clicking on the "X" in the titlebar. If they close a window that way,
the locks aren't unset and no other user may start the wizard again. If
I should know that he had clicked on the "X", I could unlock the
objects.

I have searched a lot on the net but all results aren't sufficient for
me.

Some solutions which don't work:
1) onunload event: =Also called when the window is refreshed or
forwarded.
2) "titlebar = no" property while opening the first page of the wizard,
is not working (the titlebar is still enabled). And even then, the
users can close the window by clicking CRL-F4. This key combination
isn't disabled by the "hotkeys = no" property.

! Note: if the client's pc crashes or if the user kills the wizard
process via the task manager (exceptional cases), they have to call
maintenance to reset the locks. This is a requirement, defined by
bussiness.

Could somebody help me?

Thanks in advance,
Wesley.

Save the data that collected during wizard in a temporary storage (for
example, Session in ASP.Net) and write it to db if only wizard is
succesfully finished.
Oct 31 '06 #3
Oxy
Hi all,

I just reviewed the design and in fact it is not a db lock but a Java
object lock. (but this isn't the core of this question).

Oxy schreef:
It's not really a matter of writing data to the db. If I would adapt
your suggestion on my problematic, then I should lock the objects in
the db when finishing the wizard, but that is not what is required.
When somebody starts the wizard some objects must be locked in order
that other processes may not use these objects until they are unlocked
again (by finishing the wizard).

Is this a bit clear?

marss schreef:
Oxy написав:
Dear all,
>
I am currently strungling with the fact that I want to control the
browser closure. In fact, I have a webbased application in which I use
a wizard. Ones the wizard starts, a lock is set on specific objects in
the db. On all pages of the wizard, the user get the possibility to
exit the wizard by clicking on a custom "Exit" button. That way, I know
that the user has left the wizard and that way I can unlock the locked
objects in the db again.
>
So far, so good. But users are used to close browser windows by
clicking on the "X" in the titlebar. If they close a window that way,
the locks aren't unset and no other user may start the wizard again. If
I should know that he had clicked on the "X", I could unlock the
objects.
>
I have searched a lot on the net but all results aren't sufficient for
me.
>
Some solutions which don't work:
1) onunload event: =Also called when the window is refreshed or
forwarded.
2) "titlebar = no" property while opening the first page of the wizard,
is not working (the titlebar is still enabled). And even then, the
users can close the window by clicking CRL-F4. This key combination
isn't disabled by the "hotkeys = no" property.
>
! Note: if the client's pc crashes or if the user kills the wizard
process via the task manager (exceptional cases), they have to call
maintenance to reset the locks. This is a requirement, defined by
bussiness.
>
Could somebody help me?
>
Thanks in advance,
Wesley.
Save the data that collected during wizard in a temporary storage (for
example, Session in ASP.Net) and write it to db if only wizard is
succesfully finished.
Oct 31 '06 #4
TC

Oxy wrote:

I just reviewed the design and in fact it is not a db lock but a Java
object lock. (but this isn't the core of this question).
You may want to look up the terms "optimstic locking" and "pessimstic
locking" (if you don't already know them). You are currently using the
latter. You might be able to solve your problem by using the former.
These two locking methods are applicable to any situation where you
have to manage update access to shared resources. They are nothing
specific to javascript as such.

HTH,
TC (MVP MSAccess)
http://tc2.atspace.com

Oct 31 '06 #5

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

Similar topics

2
by: kevin dalby | last post by:
I use the script below to open a side panel on my desktop without all the buttons and menu items. IE 6 It works well. What I'd like to add is add a line of code that will close the calling...
2
by: learner | last post by:
Hi, In a page, i have many links. I have some functions in a global file which is included in all linked pages. I want to have a reference to a window which is to be opened on clicking one link...
3
by: Derek Basch | last post by:
Is it bad form to use the global window variable to reference an event handlers window? Like so: function SortableTable() { oFilterAdd = this.document.createElement("button");...
5
by: GEL | last post by:
Hi, I want to open a new browser window, let the user use that window for several minutes, and when they close, I'd like to change the page displayed in the original window. According to...
7
by: Csaba Gabor | last post by:
I feel like it's the twilight zone here as several seemingly trivial questions are bugging me. The first of the following three lines is a syntax error, while the last one is the only one that...
9
by: User1014 | last post by:
I'm a javascript noob and have a question concerning some code I've come across that I'm trying to understand. Here is a snippet of the relevant section: (snip) var closure = this; var xhr =...
0
by: Gerard Brunick | last post by:
Consider: ### Function closure example def outer(s): .... def inner(): .... print s .... return inner .... 5
11
by: Huayang Xia | last post by:
What will the following piece of code print? (10 or 15) def testClosure(maxIndex) : def closureTest(): return maxIndex maxIndex += 5 return closureTest()
2
by: dhtmlkitchen | last post by:
I'm trying to learn something about JScript engine. I have the following example: <script>(function() { poop = "brown"; myFunction = function myFunction() {}
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.