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!

Disabled minimize button

Status
Not open for further replies.

erikkk

Programmer
Jun 25, 2001
12
0
0
IT
I need to disable the minimize button on the title bar of a popup window generated by the following script:

<script>

function openwin(str) {

searchWin = window.open(str,'openwin','scrollbars=yes,resizable=no,width=700,height=500,screenX=0,screenY=50,left=10,top=5,status=no,location=no,toolbar=no');

}

</script>

Does anybody know how can I do?
Thanks
 
You could use a frameless window, and just put your own borders on. Be sure to have a close window in somewher or else you have to manually kill it. Here is the code i hope it helps

var windowX = 288 // from left
var windowY = 250 // from top
var windowW=226 // wide
var windowH=232 // high

var title = &quot;Contact Details&quot;

var autoclose = true

s = &quot;width=&quot;+windowW+&quot;,height=&quot;+windowH;
var beIE = document.all?true:false

function openFrameless(param){

if (beIE){
fwin = window.open(&quot;&quot;,&quot;popFrameless&quot;,&quot;fullscreen,&quot;+s)
fwin.blur()
window.focus()
fwin.resizeTo(windowW,windowH)
fwin.moveTo(windowX,windowY)
var frameString=&quot;&quot;+
&quot;<html>&quot;+
&quot;<head>&quot;+
&quot;<title>&quot;+title+&quot;</title>&quot;+
&quot;</head>&quot;+
&quot;<frameset rows='*,0' framespacing=0 border=0 frameborder=0>&quot;+
&quot;<frame name='top' src='&quot;+param+&quot;.htm' scrolling=no>&quot;+
&quot;<frame name='bottom' src='about:blank' scrolling='no'>&quot;+
&quot;</frameset>&quot;+
&quot;</html>&quot;
fwin.document.open();
fwin.document.write(frameString)
fwin.document.close()
} else {
fwin=window.open(param+&quot;.htm&quot;,&quot;popFrameless&quot;,&quot;scrollbars,&quot;+s)
fwin.blur()
window.focus()
fwin.resizeTo(windowW,windowH)
fwin.moveTo(windowX,windowY)
}
fwin.focus()
if (autoclose){
window.onunload = function(){fwin.close()}
}
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top