Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

To disable the close button

Status
Not open for further replies.

VJay

Programmer
Mar 26, 2002
19
IN
How to disable the close button( Windows) in pop up window? And also the other navigation buttons in the menu bar.
 
Why do you want to disable people from closing the window. That is "[THE]" most annoying thing "[EVER]".

Making a popup is easy though:

-----------------[CUT LINE]-----------------
<HTML>
<HEAD>
<TITLE>TEST</TITLE>
<SCRIPT LANGUAGE=&quot;JAVASCRIPT&quot;>
function popup()
{
reWin=window.open
('/images/image.gif','POPUP','toolbar=no,location=no,directo
ries=no,status=no,menubar=no,scrollbars=no,resizable=no,widt
h=100,height=100,top=100,left=100')
}
</SCRIPT>
</HEAD>
<BODY>
<A HREF=&quot;javascript:popup();&quot;>CLICK HERE</A>
</BODY>
</HTML>
-----------------[CUT LINE]-----------------

Hope this helps!

greenjumpy.gif
NATE
 
I wanted to disable the Windows Close button. This doesnot handle it...
 
Here's how but don't expect people to ever come to your site again.

Code:
<a href=&quot;MakeEmMad.htm&quot; ONCLICK=&quot;window.open
('MakeEmMad.htm', 'NewWindow', 'toolbar=no,location=no,direc
tories=no,status=no,menubar=no,scrollbars=no,resizable=yes,c
opyhistory=no,fullscreen=yes')&quot;><h1>Don't Click Here</h1> 
</a>
 
The reason I posted my code is b/c if you want to disable all the navigation buttons on the menu bar then why bother showing it. So my code does handle that part of your question
&quot;And also the other navigation buttons in the menu bar.&quot;

Your question, if you wanted to just not show the close button and make it fullscreen, should have said, how do I make a fullscreen popup.
greenjumpy.gif
NATE
 
This is not a good thing to do.


&quot;They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.&quot;
- Benjamin Franklin, Historical Review of Pennsylvania, 1759.
 
faq215-2087
Go to the end--special tip--You can resize the window to make it less annoying, but if you don't contain a &quot;close&quot; link (<a href=&quot;javascript:self.close();&quot;>Close</a>) they will never return to that page, and probably not your whole site.

Rick
 
Hey Guys..I am into a product development...so it doesnt really matter...if I diasable the close button...I will b provide for closing of the window in the pop up :)
 
Forgot to mention Spyderix...ur code did help to suppress the navigation buttons. Thanks.
I wanted to disable the close button...when the popup is not full screen, I want to have a definite window size.
 
So you want to have the blue bar at the top, but with either no close button or a greyed out one? That is not possible (except meybe with VBscript?).

Rick
 
Thanks Rick, The Info was really useful, answered both my Qs , Close button and restricting Refresh.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top