How can I make a window maximize itself after I load it (new window) from a link?
-Emo
Printable View
How can I make a window maximize itself after I load it (new window) from a link?
-Emo
put in the page that is being loaded:
Code:<script language="Javascript">
window.moveTo(0,0)
window.resizeTo(screen.width,screen.height)
</script>
I have tried using the code but the problem when I click the Maximize button of the window it still maxmize to some extend and also the Maximize symbol is also changed (The symbol that would appear when the Window page is in Maximized mode).
Is there any other thing i want to set to the current window? Is there a way to set the Current window in Maximized mode in Javascript?
The code shown above is how it's usually done. Are you saying it's going large but not large enough? Explain with screenshots if you must.
Also, someone's going to point this out to you at some point, so I'll take the bait - having client script "do things" to the end user's window is rather annoying and you should have a really good reason for wanting to do this. I can't think of a reason for wanting to do this.
I have used the Javascript Code,
in a routine PageSize and called this in Onload event of the Body.Code:window.moveTo(0, 0);
window.resizeTo(screen.Width,screen.Height);
On Executing the page shows like this in the Attachment "screenshot1.gif"
Also when I click on the middle Icon, the page maximize stills and the icon changes to double window as shown in the Attachment "screenshot2.gif".
Is my problem is valid? Is there any other thing I need to handle in the code??? Kindly comment...
Is there any other option i have missed above???
Is that a problem? When a window is maximized, it's supposed to have that "double window" icon in the middle there.
If you're wondering why it doesn't happen the first time, it's because the window isn't being maximized by the javascript code, it's being resized. You can resize a window to any size you want, even larger than the screen width and height.
Thanks da_silvy and mendhak.
No problem, add [Resolved] and post back if you have more questions.