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

how to disable window (X) close button using javascript

hi,
i want to know that how can i disable the close (x) button of pop window,using javascript.

thanx.
Mar 16 '07 #1
9 68060
acoder
16,027 Expert Mod 8TB
When you use window.open, you can set titlebar to no or 0, but it is usually ignored, see link.

The alternative is to create a draggable div instead of a popup.
Mar 16 '07 #2
thanx acoder.
Mar 16 '07 #3
Hey Can You Help me out
I have used window.showModalDialog()
to popoup
Now i want to diable the close button
is it possible
can anyone help me out
Jul 18 '07 #4
acoder
16,027 Expert Mod 8TB
Hey Can You Help me out
I have used window.showModalDialog()
to popoup
Now i want to diable the close button
is it possible
can anyone help me out
Welcome to TSDN!

Do not use showModalDialog - it is only supported by IE.

There's no option to disable the close button, see the documentation.

If you want this functionality, create your own draggable DHTML pseudo-popup.
Jul 18 '07 #5
gits
5,390 Expert Mod 4TB
hi ...

in case you want to call a javascript function before closing the window you may use the 'onbeforeunload'-event ... normally i think this is the typical reason to want to have the close-button disabled ... so you may capture the closing of the window and may do something you want in that case ...

kind regards
Jul 18 '07 #6
hi ...

in case you want to call a javascript function before closing the window you may use the 'onbeforeunload'-event ... normally i think this is the typical reason to want to have the close-button disabled ... so you may capture the closing of the window and may do something you want in that case ...

kind regards
hi
Thanks for the reply
Well have you gone through google calender
When you click On theEvent a popup box APPEARS WITH TAIL POINTING TO PARENT WINDOW
is it possible to create such popup window using javascript
can u give some solution for this
Jul 23 '07 #7
gits
5,390 Expert Mod 4TB
hi
Thanks for the reply
Well have you gone through google calender
When you click On theEvent a popup box APPEARS WITH TAIL POINTING TO PARENT WINDOW
is it possible to create such popup window using javascript
can u give some solution for this
hi ...

there's a new thread with this question from you moved here from another forum, so i'll put the link to it here:

http://www.thescripts.com/forum/thread681560.html

it's better to use the new thread there for your question.

kind regards
Jul 23 '07 #8
hi,
i want to know that how can i disable the close (x) button of pop window,using javascript.I have set titlebar to no . But it's still not workiing.

can someone help me out please...

thanx
Sep 6 '07 #9
gits
5,390 Expert Mod 4TB
hi ...

welcome to TSDN ...

have a look at post #6 ... the answer is up there ;) ... you cannot disable that button, but you may resspond to the event when it is clicked.

kind regards
Sep 6 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Prashant Joshi | last post by:
Hi all, I am using javascript to open a popup window. Is there any way we can disable the minimize button in this window? The maximize button is disabled. I want the same for the minimize button....
3
by: Steve | last post by:
Hi, I have a nice little script that works well displaying images on my website. It's a script where if you clik a thumbnail image a pop up window opens that contains a larger version of the same...
6
by: nntp | last post by:
I have a set of links which I want search engines to crawl them, but I want to disable them from my visitors, so I will ask the link owners to pay me to let me enable them. <a disabled...
1
by: Earl Teigrob | last post by:
I did a ton of searching to try and find a simple solution to this issue and finally wrote my own, which I am sharing with everyone. In my searching, I did find a very complete and robust solution at...
3
by: Paul | last post by:
Hi, just wondering if there is a way to disable the back button of the browser as I have a logoff page and would like to not allow the back operation? Guessing there may be a way to do it through...
7
by: Toccoa | last post by:
After considerable googling - I mean searching with Google(r) - I could not find javascript on a button or <a href=... to close a window in the latest versions of IE and FireFox. There seemed...
2
by: kurt sune | last post by:
Hello, I have a weird problem, I hope someone can explain this for me. I have a webpage using masterpage. In it I create a popup window using this code: Dim js As String = "<script...
4
by: sasimca007 | last post by:
Hello friends, In my project, i am opening a window with javascript, in that new window i am providing a link to close that window, then there is no use of default close...
8
by: alamodgal | last post by:
hiiiiiiiiiii everybody, pls solve my problem if u can? Actualy what happens in my site when i press enter key it will show some secured...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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
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
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
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:
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.