View Full Version : resize browser window!
jerry
November 5th, 2002, 09:55 AM
Hey!
I'm looking for a script that can resize the browser window! For example: I got a script that opens a new window, in the new window I would like to have a few buttons, that when you press the window would be resized! ..Like it fades to another size!
Abraxxas
November 11th, 2002, 03:50 AM
Button>JavaScript>Resize window, eh? is this your request? Well, take a look at the following:
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
function resize() {
window.resizeTo(740, 580);
}
</SCRIPT>
</HEAD>
<BODY>
<input type=button onclick=resize()>
Guig0
December 19th, 2002, 09:57 AM
that will make the window resize gradually?
=)
h88
December 19th, 2002, 10:35 AM
Try the following:
Insert this into your HTML:
<SCRIPT LANGUAGE="JavaScript">
function resize(x, y) {
window.resizeTo(x, y);
}
</SCRIPT>
And the actionscript involved is:
[*PHP]x = 500;
y = 500;
getURL("javascript:resizeTo("+x+","+y+");");[/PHP]
h88 8]
h88
December 19th, 2002, 10:45 AM
Originally posted by Guig0
that will make the window resize gradually?
Nope.
Guig0
December 19th, 2002, 10:50 AM
that didnt work:(
ahmed
December 19th, 2002, 11:00 AM
hey.. i havent dealt with javascript (yet:P).. but if loops work the samy way the do on any other languages, you might be able to make a loop that resizes the window gradually using this code..
Originally posted by Abraxxas
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
function resize() {
window.resizeTo(740, 580);
}
</SCRIPT>
if theres a function that gets the current window size, then you can subtract the new size off the current size and divide that into lets say 10 and store it into a variable, and loop the resizeTo() function 10 times, where it subtracts the number in that variable.....
again, this is just an assumption.. im into javascript really=)
h88
December 19th, 2002, 11:02 AM
Guig0:
remove the space from the java script word, i dunno why the forum add's this space. :-\
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.