471,091 Members | 1,547 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

How can I set the close or exit (red X) attribute in a pop-up window

How can I set the close or exit (red X) attribute to 'no' or zero in a
javascript pop-up ie browser window? I'd like to prevent users from
closing their on-line exam window.

Thanks,

Joey
Jul 23 '05 #1
4 1400
Ivo
"Joeyej" wrote
How can I set the close or exit (red X) attribute to 'no' or zero in a
javascript pop-up ie browser window? I'd like to prevent users from
closing their on-line exam window.


Sorry, but you can't. You will have to trust your users to close the window
only when they think it is appropriate to do so. Any hacks you can think of
to ensure they will not close the window against your will, can be
circumvented, for the sole reason of it being done in javascript.
If this is a real problem, you need to rethink your application, ie. not use
popup-windows.

Another tip, if you 're dealing with ie only, is to look into the subject of
..hta files.

HTH
--
Ivo
http://www.vansandick.com/
Jul 23 '05 #2
You can try opening a fullscreen window by javascript so that no redX
appears on top.
I had seen an exam page like this before.

"Joeyej" <jo*************@quinnipiac.edu> wrote in message
news:f0**************************@posting.google.c om...
How can I set the close or exit (red X) attribute to 'no' or zero in a
javascript pop-up ie browser window? I'd like to prevent users from
closing their on-line exam window.

Thanks,

Joey

Jul 23 '05 #3
Ivo
"CarettaCare" top-posted
"Joeyej" wrote
How can I set the close or exit (red X) attribute to 'no' or zero in a
javascript pop-up ie browser window? I'd like to prevent users from
closing their on-line exam window.

You can try opening a fullscreen window by javascript so that no
redX appears on top.


The danger with such advice is it gives the inexperienced website designer
the idea that the goal has been achieved while nothing of the sort has
happened. Again: this level of control does not exist on the web, it is not
possible, the answer is no, forget it, take a different appraoch, don't you
realize that people don't even need that X button to close a window when
they know about alt-F4 or simply right-click on their taskbar?

I hope this helps.
--
Ivo
http://www.vansandick.com/
Jul 23 '05 #4
On Sat, 4 Dec 2004 00:32:14 +0100, Ivo wrote:
"CarettaCare" top-posted
"Joeyej" wrote
How can I set the close or exit (red X) attribute to 'no' or zero in a
javascript pop-up ie browser window? I'd like to prevent users from
closing their on-line exam window.

You can try opening a fullscreen window by javascript so that no
redX appears on top.
(trimmed, reinstated) I had seen an exam page like this before.


The danger with such advice is it gives the inexperienced website designer
the idea that the goal has been achieved while nothing of the sort has
happened.

(snip explanation of why)

But you all missed the point of the 'test'! The 'exam' was for
determining if the examinee was a power user who knew that all
the answers were in the source, and simply copy/pasted them. ;-)

[ This story adapted from. 'My friend performed an exam for
an engineering apprenticeship and noticed all the answers were
written on the back of the sheet. ...' ]

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
Jul 23 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by E Michael Brandt | last post: by
1 post views Thread by Sunit Joshi | last post: by
2 posts views Thread by Houston Lucifer | last post: by
2 posts views Thread by jackson2005 | last post: by
11 posts views Thread by V S Rawat | last post: by

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.