Hooman
05-27-2003, 12:39 PM
How do I maximize a window, onLoad?
Thanks
Thanks
|
Click to See Complete Forum and Search --> : maximize the window Hooman 05-27-2003, 12:39 PM How do I maximize a window, onLoad? Thanks Nevermore 05-27-2003, 12:43 PM <script language="JavaScript"><!-- function max() if (window.screen) { window.moveTo(0,0); window.outerHeight = screen.availHeight; window.outerWidth = screen.availWidth; } } //--></script> Call that onload: <body onload="max()"> Hooman 05-27-2003, 01:00 PM Thanks for the respond, I tried it, didn't work. I have 3 frames in my window, I put it in the main frame. Should I put it in every single frame? Thanks, Nevermore 05-27-2003, 02:22 PM If it's in frames, it should go in the frameset document. Hooman 05-27-2003, 03:38 PM Do u mean in the framset tag? here's the way I have it right now: ______________________________________________________ <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <SCRIPT type="text/javascript"> window.onerror = new Function("return true"); function max() { if (window.screen) { window.moveTo(0,0); window.outerHeight = screen.availHeight; window.outerWidth = screen.availWidth; } } </SCRIPT> </head> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <SCRIPT type="text/javascript"> window.onerror = new Function("return true"); function max() { if (window.screen) { window.moveTo(0,0); window.outerHeight = screen.availHeight; window.outerWidth = screen.availWidth; } } </SCRIPT> </head> <frameset cols="92,*" frameborder="YES" border="1" framespacing="1" rows="*"> <frame name="leftframe" scrolling="NO" noresize src="mylist.htm"> <frameset rows="80,*" frameborder="NO" border="0" framespacing="0"> <frame name="topFrame" scrolling="NO" noresize src="top.htm" > <frame name="mainframe" src="pic.htm"> </frameset> </frameset> <noframes> <body bgcolor="#FFFFFF" text="#000000" onLoad="max();"> </body> </noframes> </html> ______________________________________________________ Thanks, ccoder 06-20-2003, 01:48 PM I'm having the same problem with my page. The difference being that I am using layers rather than frames and I'm using the approach in Danny Goodman's JavaScript Bible, i.e.: // define the function function fullScreen() { this.moveTo(0,0) this.outerWidth = screen.availWidth this.outerHeight = screen.availHeight } // assign the function to a custom property window.maximize = fullScreen I call window.maximize in function Init() which is called by my: <BODY BGCOLOR="#FFFFFF" ONLOAD="init()"> I have even gone so far as to try cijori's code: function init() { // force browser to full screen and get available document area dimensions // window.maximize(); window.moveTo(0,0); window.outerHeight = screen.availHeight; window.outerWidth = screen.availWidth; to no avail. I'm working with IE 5.5. Thoughts, anyone? ccoder 06-20-2003, 02:04 PM I should have looker a bit further :p ! I found my answer in the thread:http://forums.webdeveloper.com/showthread.php?s=&threadid=2203&highlight=maximize My fullScreen function is now: function fullScreen() // custom property for window object { this.moveTo(0, 0); this.resizeTo(screen.availWidth,screen.availHeight) // this.outerWidth = screen.availWidth; // this.outerHeight = screen.availHeight; } // end of fullScreen webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |