Click here to Skip to main content
15,867,594 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I am opening a popup window in my website.

I want to disable minimize button so that focus on popup window.
I had tried <body onblur="this.focus()">.

But it didn't work.
Posted
Updated 6-Dec-10 21:55pm
v2
Comments
Dalek Dave 7-Dec-10 3:55am    
Edited for Code and Readability.
Brij 7-Dec-10 4:04am    
Are you trying disable the minmize button of Popup?

1 solution

No, you have no control over the minimize button of a new window (unless
you're talking about Microsoft specific modal dialogs)



Use showModalDialog which is only applicable to IE


If you call the function given below from your code, it will open a modal window, which will not have the minimize/maximize buttons, but it does not take care of the close button.

function showWin() {  var newlookup = window.showModalDialog("http://www.yahoo.com",  "", "","status=0;help=0;dialogHeight=" + 400 + ";dialogWidth=" +600 ) }



For more details of showModalDialog,

showModalDialog
 
Share this answer
 

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