Connecting Tech Pros Worldwide Forums | Help | Site Map

launch window certain size etc *by itself*

briansmccabe@gmail.com
Guest
 
Posts: n/a
#1: Jul 25 '05
does anyone know how I could get a page to open to a specific size and
location on the screen on its own? in other words, the page is not
being launched from any other page; it simply resides on my local
machine and I would like to see it launch to a specific size etc.

thanks

Brian mc


web.dev
Guest
 
Posts: n/a
#2: Jul 25 '05

re: launch window certain size etc *by itself*


Hi Brian,

briansmcc...@gmail.com wrote:[color=blue]
> does anyone know how I could get a page to open to a specific size and
> location on the screen on its own? in other words, the page is not
> being launched from any other page; it simply resides on my local
> machine and I would like to see it launch to a specific size etc.
>
> thanks
>
> Brian mc[/color]

Yes there is a way. Javascript has a Window object with these methods
which can achieve what you want:
[color=blue]
>specific..location on the screen[/color]

window.moveBy(dx, dy)
window.moveTo(x, y)
[color=blue]
>open to a specific size...[/color]

window.resizeBy(dw, dh)
window.resizeTo(width, height)

The only difference is dependent on how you want to do your desired
action. i.e., do you want to do it by relative or absolute amount.

Hope this helps. :)

Randy Webb
Guest
 
Posts: n/a
#3: Jul 25 '05

re: launch window certain size etc *by itself*


briansmccabe@gmail.com said the following on 7/25/2005 1:45 PM:
[color=blue]
> does anyone know how I could get a page to open to a specific size and
> location on the screen on its own?[/color]

Open IE to that size, then close it.
[color=blue]
> in other words, the page is not being launched from any other page;
> it simply resides on my local machine and I would like to see it launch
> to a specific size etc.[/color]

See above.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Closed Thread