Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi friends, please help me, i have want to disable the maximize button of window popup
my code is--

<script type="text/javascript">

JavaScript
function OpenPopUp(PID) {
      //alert("Pardeep");
      window.open('GoogleMapSummary.aspx?PID=' + PID, 'name', 'width=700,location=no,menubar=no,height=500,scrollbars=no,resizable=no,fullscreen=no');
      return false;
  }
  </script>



Thanks in advance.
Posted
Updated 18-Apr-12 21:18pm
v3
Comments
Syed Salman Raza Zaidi 18-Apr-12 9:32am    
Whats the issue with this code?
Shahin Khorshidnia 19-Apr-12 3:17am    
Why did you tag C#?

 
Share this answer
 
hi,
try by setting "risizable=no" in window.open.

check this.

http://msdn.microsoft.com/en-us/library/ie/ms536651(v=vs.85).aspx[^]
 
Share this answer
 
try this code
C#
window.open("http://www.domainname.ext/yourfile","windowname","resizable=no");
 
Share this answer
 
It is THE sollution!!


Take a look at this link.

http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/showmodaldialog.asp[^]

There's a demo and a nice description.

Another Trick

you can disable the maximize button by setting the window popup var t
resize=0 and to disable the minimize button set the following in th
popup window's body tag onblur="this.focus()"
 
Share this answer
 
v4
Comments
Nelek 18-Apr-12 17:49pm    
Edit: Made the link clickable
hi this is the javascript code for disable the window popup maximize option.
JavaScript
<script language="javascript" type="text/javascript">
   
function InitializeMap() 
       {
           document.onkeydown = function () {
            if (122 == event.keyCode) {
                event.keyCode = 0;
                return false;
       }
      }
}

window.onload = InitializeMap;
</script>
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900