Log in

View Full Version : Mimimize Button?



andyraah
02-08-2009, 10:17 PM
I want to create a button that will minimize the browser. Anyone know how?

magicyte
02-08-2009, 10:38 PM
It isn't possible, I don't think (in JavaScript or any other client-side scripting for that matter). Maybe a Java app could do it, but I wouldn't know how.

Schmoopy
02-09-2009, 01:23 AM
I imagine it can be done with JavaScript, I doubt PHP could do this...

Dirt_Diver
02-09-2009, 02:08 AM
<html>
<head>
<script type="text/javascript">
function resizeWindow()
{
top.resizeTo(500,300); /* Replace this with the size you want */
}
</script>
</head>

<body>
<form>
<input type="button" onclick="resizeWindow()" value="Resize window">
</form>
</body>

</html>

andyraah
02-09-2009, 02:24 AM
I can't get it to work.

andyraah
02-09-2009, 02:26 AM
Is there a way to bring back the last open application, then?

Dirt_Diver
02-09-2009, 03:00 AM
I'm sorry I am resizing the window instead of minimizing it.

and you can use this to go back in history if you are talking about internet pages.

<FORM>
<INPUT type="button" value="Click here to go back" onClick="history.back()">
</FORM>

Dirt_Diver
02-09-2009, 03:18 AM
I don't know of a way but couldn't you just right click on the window in the taskbar and choose minimize?

Mafishioso
02-12-2009, 05:03 PM
I want to create a button that will minimize the browser. Anyone know how?

I agree with Schmoopy it can be done with JavaScript....:)

JVposter
02-20-2009, 02:19 PM
You have here another example in javascript
http://www.htmlgoodies.com/beyond/javascript/article.php/3471151



<SCRIPT LANGUAGE="JavaScript">

function Minimize()
{
window.innerWidth = 100;
window.innerHeight = 100;
window.screenX = screen.width;
window.screenY = screen.height;
alwaysLowered = true;
}

function Maximize()
{
window.innerWidth = screen.width;
window.innerHeight = screen.height;
window.screenX = 0;
window.screenY = 0;
alwaysLowered = false;
}
</SCRIPT>

<A HREF="javascript:onClick=Minimize()">Minimize</A>
<A HREF="javascript:onClick=Maximize()">Maximize</A>

andyraah
02-20-2009, 03:44 PM
JVposter, Thanks for the tip. I couldn't get it to work. I think this only works in Netscape Navigator 4.0+. I think I might just opt for the small title bar on top with the buttons already there. Any idea how to open a new window with just these items?