window.open remove minimize and maximize buttons from popup

I know this question has been answered, but I can't view the solution since I terminated my subscription to premium services.

I searched in the JavaScript Area for "minimize remove" - the second question seems to have the answer.  This should be an easy 125 points.

Here's my current code in case it's helps anyone.  The third argument to OpenDialog is passed directly to window.open "as is".

function MBPopup_Hack(url,dialog,height,width)
{
  MetaBuilders_DialogWindow_OpenDialog(url, dialog, 'resizable=no,menubar=no,status=no,toolbar=no,scrollbars=no,location=0, directories=0,dependant=yes,dialog=yes,modal=yes,unadorned=yes,height=' + height + ',width=' + width + ',left=100,top=100');
  return false;
}

todd_pravataAsked:
Who is Participating?
 
lil_puffballCommented:
No, as eeBlueShadow mentioned it cannot be done easily.

IE only again, with no control over the size:

window.open("url.htm","","fullscreen=yes")
0
 
lil_puffballCommented:
The answer to that question is this:

<html>
<head>
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--

function window_onload() {
     var hWnd = window.showModalDialog("http://aav1.aavacations.com/Consumer/aavspcfc.asp?BROCHURE=B2","HelpWindow","width=600,height=400,location=no,status=no,
menubar=no,toolbar=no,resizable=no,scrollbars=no");
     
}

//-->
</SCRIPT>
</head>
<body  LANGUAGE=javascript onload="return window_onload()">
<form name="form1" method="post"  action="test.asp">
<input type="text" name="name1" value="">
<input type="submit" name="asad" value="edit">
</form>
</body>
</html>
0
 
todd_pravataAuthor Commented:
Sorry, I had no success with showModalDialog.  Also, it appears that it is IE specific.

Isn't there just some way to tell window.open to not show the minimize and maximize buttons?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
eeBlueShadowCommented:
>> Isn't there just some way to tell window.open to not show the minimize and maximize buttons?

no. (sorry)
0
 
todd_pravataAuthor Commented:
Seems like I will need to award points for a No answer :( - of which there were two.  

Maybe this can break the tie:

Here are the attributes I'm using (see below).  The minimize button comes up enabled (not desired), the maximize shows as disabled (desired).  When I click on the minimize button, nothing happens - which is OK.

I don't want the user to minimize, maximize (or resize) the window ... and they can't as it stands now, but I'd prefer if the minimize button was also disabled.  Is there anyway to accomplish this?

I've searched high and low for this so I really appreciate the help.  Thanks.

window.open("foo.htm", "", "modal=1, height=200, width=200");

FYI - I removed all the of the other attributes that were mentioned in the original question as they seemed to have no effect.
0
 
lil_puffballCommented:
Here's a pretty good workaround:

<script>
var timeint,win;
function showWin(url,w,h){
  if(window.showModalDialog){
    window.showModalDialog(url,null,"dialogWidth="+w+"px;dialogHeight="+h+"px");
  }else{
    win=window.open(url,"","width="+w+",height="+h+",resizable=no");
    document.onfocus=function(){win.focus();}
    timeint=setInterval("if(win.closed){clearInterval(timeint);document.onfocus=null;}else{win.focus();}",100);
  }
}
</script>

<button onclick="showWin('test.htm',200,200);">Show Window</button>
0
 
lil_puffballCommented:
Reread your post, you mention that "When I click on the minimize button, nothing happens - which is OK." How have you accomplished this?
0
 
eeBlueShadowCommented:
Don't worry about the deadlock, there's not many people as fast as lil_puffball ;)

Maybe I'll get to a question before her one day :P

_Blue
0
 
todd_pravataAuthor Commented:
Not sure.

I had this

window.open("foo.htm", "", "modal=1, height=200, width=200");

and just changed it to this

window.open("foo.htm", "", "height=200, width=200");

Still looks the same and does the same thing.  So I have no idea why minimize does nothing when clicked.

I'm in an IE 6.0 browser and I don't want to write anything browser specific.  If there is no way to do this, then I'll just live with that.  Not sure what your code does.

FYI - any boolean type window.open attribute that you do not set defaults to false|no|0.  So, saying resizable=no, is just the same as not saying it at all.
0
 
lil_puffballCommented:
Blue, lol...I just have lots of time on my hands. ;)

todd,
with your code minimize does work when you click it, seems weird that it doesn't...
My code is not browser specific. It works nicer with IE, but if the browser does not support showModalDialog, it generates a work around that's not so nice but works. Have you tried it out?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.