473,396 Members | 2,011 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,396 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 1447
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: andrewkooi | last post by:
Greetings, I do not know whether such code exist but no harm asking: Is it possible for me to make visible a close button if the active window is a popup window or a new window (other than the...
7
by: E Michael Brandt | last post by:
I have been lurking here for some time, and now would like to ask a question of you clever coders: My JustSo PictureWindow 3 Extension for Dreamweaver has stumbled in the face of the new Opera...
4
by: GrantS | last post by:
I am having a problem closing a popup window opened modally. When I try to close the window (when the user hits save button and the data has been processed), the Popup window opens as a full screen...
1
by: Sunit Joshi | last post by:
Hello All I have an aspx with a datagrid having hyperlink colns. I open a popup window like this <asp:HyperLinkColumn DataTextFormatString="Click.." DataNavigateUrlField="ID" DataTextField="ID"...
0
by: ChrisB | last post by:
I'm attempting to open a new window from a LinkButton in a DataGrid. I can set a session variable in the ItemCommand event for the LinkButton like so: // this is used to handle the ItemCommand...
2
by: Houston Lucifer | last post by:
Hi all, I have a gridview which in the edit mode has a column which has two radio buttons (Approve and Deny). When the user selects deny i have to popup a window with the description textbox where...
2
by: jackson2005 | last post by:
OK, I need to do three different things. On the ONLOAD event I would like a popup box to open. In this popup box I need two text boxes. One for the UserName and one for the BillingTo name. ...
1
by: vp.softverm | last post by:
hi all . Am facing problem with the date picker. when i click on date picker in a popup window. the date table is opened in the middle of the pop up window. and it is unable to scroll with...
11
by: V S Rawat | last post by:
using Javascript, I am opening a web-based url in a popup window. MyWin1=Window.Open(url, "mywindow") There is a form (form1) in the url in that popup window, I need to submit that form. ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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:
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...

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.