Current location: Hot Scripts Forums » General Web Coding » JavaScript » How to disable close button in a window


How to disable close button in a window

Reply
  #1 (permalink)  
Old 03-22-05, 03:09 AM
cheenu1979 cheenu1979 is offline
Newbie Coder
 
Join Date: Feb 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
How to disable close button in a window

Hi everyone
I want to open a popup window from the parent and it works as a preloader and once my parent window is loaded and i`ll close the popup window from the parent. But my popup window has a close button on the top right,i want to disable the close button to avoid users closing it.
Any quick suggestions will be appreciated
cheers
Genji
Reply With Quote
  #2 (permalink)  
Old 03-22-05, 01:21 PM
TwoD TwoD is offline
Community VIP
 
Join Date: Sep 2003
Location: 404
Posts: 1,813
Thanks: 0
Thanked 0 Times in 0 Posts
Here's what I found with Google when searching for "disable window close button X javascript".

Quote:
Can I disable the window's close (X) button?
Sep 18th, 2004 06:20

Daniel LaLiberte, Martin Honnen, Jap Boon Churn





You cannot disbable that button with client side javascript. The user
remains in control of the window.
Trusted script can however with NN4 open a window without the titlebar.
And IE can open a window fullscreen without titlebar with
open ('url', 'windowName', 'fullscreen')

In IE4, JavaScript in the page can catch all events that might close
the window and prompt the user with a dialog asking whether to
proceed. See the 'onbeforeunload' event.
Reply With Quote
  #3 (permalink)  
Old 03-22-05, 01:23 PM
MadDog MadDog is offline
Code Master
 
Join Date: Aug 2003
Posts: 935
Thanks: 0
Thanked 0 Times in 0 Posts
Thats correct. You can not disable back buttons or close buttons. That is something the client will allows have.
__________________
Drew Gauderman
ASP - MSSQL Coder / Buisness Owner / Coder for Hire!
MSN-ICQ-AIM-YIM in Profile

http://www.iportalx.net an easy ASP portal system.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to disable browser's back button after logout shaky ASP 7 08-18-06 07:37 AM
Window close option Help Imad JavaScript 1 02-22-05 05:11 PM
[Help] Javascript pop up window with background color empty.container JavaScript 1 01-13-05 03:11 AM
Help! ace-teck JavaScript 1 10-15-04 09:17 AM
Session or anything else require close window event? webFani PHP 2 04-14-04 11:43 PM


All times are GMT -5. The time now is 10:44 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.