Wednesday, July 07, 2004

Making a Web Apps Browser Window Maximized at Start Up

Finally figured out (first time I tried) how to make the browser maximize upon application start:

in html HEAD add this script/function block:

script lang="javascript"
function doOnLoad()
{
window.resizeTo(window.screen.availWidth, window.screen.availHeight);
window.moveTo(0, 0);
}
/script

Then in the BODY tag add this:

onload="javascript:doOnLoad()"

poof! works.

1 comment:

Bart Man said...

A colleague noted that implementing this behavior is 'Rude'; hi-jacking the poor user's browser.

I sheepishly have to agree.

C# Sucks!

JK!! Seriously, though, somewhere around C#-3 we should have inculcated ourselves with the question: "Does 'CAN' == 'SHOULD...