
|
Here is a function that decreases the width and the height of
a window by 30 pixels: function iljresize() { self.resizeBy(-30,-30) } Put the function between SCRIPT tags in the HEAD part (see JavaScript 1 basics). A call could look like this: <A HREF="#" ONCLICK="iljresize();return false">resize window</A> Each time you click the link the window gets smaller. If you remove the minus signs the window will become bigger and bigger. You cannot make a window smaller than 100x100 pixels. If you want the window to have a specific size you can use resizeTo() e g function iljresize2() { self.resizeTo(640,480) } This will make the window 640 pixels wide and 480 pixels high. Since this is code that does not work in all browsers it might be a good idea to use browser-detecting code (more about that under JavaScript 1 basics). Page by ilj@flowsim.se Last modified: August 27, 1999 This page should be part of a frames system at http://www.flowsim.se |