...

View Full Version : easy question but im dumb....window size



mybleedinheart
01-09-2004, 06:33 AM
Im an idiot when it comes to java so here it goes. I'm launching a html file from a cd with an auto launch inf. The html file I want to launch (launch.htm) needs to be centered and in a 396x433 window. Is there something I can put in the head to make the window this fixed size with no scrollbars explorer ect. I cant find this script other than as a popup and dammit i dont want a popup the autolaunch.inf alrady takes care of that. any help?

glenngv
01-09-2004, 07:36 AM
you can use:
window.moveTo(x, y) and window.resizeTo(w, h) methods.
http://www.devguru.com/Technologies/ecmascript/quickref/window.html

To remove the scrollbars:
<body scroll="no">

mybleedinheart
01-09-2004, 07:54 AM
by any chance could you write the code out for me? and does it go in the head or body of the html document. As i said I've never used java before so this is all new to me. Sorry for being an idiot. I'd learn it for myself if it weren't for a project due in 2 days.

Garadon
01-09-2004, 09:03 AM
<script>
width=433;
height=396;

centerX=screen.width/2-width/2;
centerY=screen.height/2-height/2;


window.resizeTo(width, height);
window.moveTo(centerX, centerY);

</script>
<body scroll=no></body>


the explorer etc. I don't think u can remove once the page is loaded but hey it IE I migth be wrong :P

masten
01-11-2004, 01:16 AM
mybleedinheart

Im trying to do a similar thing

did you ever get this to work,

the window resize works for me,

but getting rid of the scrollbars, tool bar etc - I cant get that to work??

thanks

Masten

glenngv
01-12-2004, 06:55 AM
You can't get rid of the toolbars, menubars, address bars in the parent window (not opened by window.open()). But the scrollbars you can, but it only works in IE.

<body scroll="no">

Removing the scrollbars is an accessibility problem. That's why, AFAIK, only IE supports it. :rolleyes:

masten
01-15-2004, 10:45 PM
glengv

I set the behaviour in the link which got round the whole problem - but thanks anyway

M



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum