How to disable minimize, maximize button in the browser?

How to disable minimize, maximize button in the browser?

using javascript.

Answers:

Answer

You cannot (consistently). Deliberately malicious actions are generally restricted by browsers.

Answer
window.open("mypage.html","mywindowname", "toolbar=no,menubar=no");

WIll give you a new window without the menubar and without the toolbar. That's what I'm assuming you want when you say "disable". If you just want to disable the functionality while still showing the buttons, then you can't.

Look here for a reference on the window.open() method.

Answer

Here is another approach, you can send key strokes for Alt, Space,N.

    <SCRIPT LANGUAGE="JavaScript">

var WshShell = new ActiveXObject("WScript.Shell");
function Minimize()
{
    WshShell.SendKeys("% n");
}
</SCRIPT>

</HEAD>

<BODY >
<TABLE width=100%>
<TR align=right>
    <TD><input type="button" name="Button" onclick="Minimize()" value="minimize" /></TD>
</TR>
</TABLE>

</BODY>
Answer

For Firefox:

<script>
    window.open("http://www.google.com/", "Google", "dialog=yes");
</script> 

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.