View Full Version : Browser size
shanerhoden
07-06-2007, 12:07 AM
If this code makes the browser window max
<script language="JavaScript1.2">
top.window.moveTo(0,0);
if (document.all)
{ top.window.resizeTo(screen.availWidth,screen.avail Height); }
else if
(document.layers || document.getElementById)
{
if
(top.window.outerHeight < screen.availHeight || top.window.outerWidth <
screen.availWidth)
{ top.window.outerHeight = top.screen.availHeight;
top.window.outerWidth = top.screen.availWidth; }
}
</script>
Than how do I change the code where it makes my browser window 800*600?
Flash Gordon
07-06-2007, 12:13 AM
top.window.resizeTo(800, 600);
replace all screen.availFOO code with your values.
shanerhoden
07-06-2007, 12:21 AM
Thank you for helping me. But I tired doing what you said for me to do but I didnt work. I am VERY new to html. Could you please possablity rewrite the script for me?
shanerhoden
07-06-2007, 12:26 AM
If this code makes my browser window the max size...
<script language="JavaScript1.2">
top.window.moveTo(0,0);
if (document.all)
{ top.window.resizeTo(screen.availWidth,screen.avail Height); }
else if
(document.layers || document.getElementById)
{
if
(top.window.outerHeight < screen.availHeight || top.window.outerWidth <
screen.availWidth)
{ top.window.outerHeight = top.screen.availHeight;
top.window.outerWidth = top.screen.availWidth; }
}
</script>
Than how do I make it tell the browser to go to 800 X 600?
Flash Gordon
07-06-2007, 12:28 AM
don't cross post, you know better :(
http://javascript.internet.com/generators/popup-window.html
shanerhoden
07-06-2007, 12:31 AM
Sorry for muli-posting I'm just a little desperate. I've been trying to make this all work all morning and night and today. The link you gave me shows me how to click a button and then change it to a set size. I need a code that when you open the file that it goes to your set size.
Flash Gordon
07-06-2007, 12:35 AM
window.resizeTo(800, 600);
something like that is all you need. Does work for people that turn off that feature in JS.
shanerhoden
07-06-2007, 12:45 AM
which parts of the code do I replace it. It keeps turning red?
shanerhoden
07-06-2007, 01:08 AM
Let say this file is on my desktop, when I open the file in my browser I want it to automatically resize to 800*600. I know the following code makes it go to its max. But....
<script language="JavaScript1.2">
top.window.moveTo(0,0);
if (document.all)
{ top.window.resizeTo(screen.availWidth,screen.avail Height); }
else if
(document.layers || document.getElementById)
{
if
(top.window.outerHeight < screen.availHeight || top.window.outerWidth <
screen.availWidth)
{ top.window.outerHeight = top.screen.availHeight;
top.window.outerWidth = top.screen.availWidth; }
}
</script>
But how do I edit this code to size down to 800*600. I've been told to put "top.window.resizeTo(800, 600);" in the code but I dont know where in the code I should place it. Please help me...
Flash Gordon
07-06-2007, 01:22 AM
don't follow the rules, people are less likely to help you.
Don't take time to look for yourself, people are less likely to help you.
PM-ed a mod for your crosspost. I've already mentioned it once and you posted at least 3 more :(
and I already told you the answer.
shanerhoden
07-06-2007, 01:22 AM
Let say this file is on my desktop, when I open the file in my browser I want it to automatically resize to 800*600. I know the following code makes it go to its max. But....
<script language="JavaScript1.2">
top.window.moveTo(0,0);
if (document.all)
{ top.window.resizeTo(screen.availWidth,screen.avail Height); }
else if
(document.layers || document.getElementById)
{
if
(top.window.outerHeight < screen.availHeight || top.window.outerWidth <
screen.availWidth)
{ top.window.outerHeight = top.screen.availHeight;
top.window.outerWidth = top.screen.availWidth; }
}
</script>
But how do I edit this code to size down to 800*600. I've been told to put "top.window.resizeTo(800, 600);" in the code but I dont know where in the code I should place it. Please help me...
Please do not post the same question multiple times and/or in multiple sections.
atomic
07-06-2007, 04:10 AM
<script language="JavaScript1.2">
top.window.moveTo(0,0);
if (document.all)
{ top.window.resizeTo(800,600); }
else if
(document.layers || document.getElementById)
{
if
(top.window.outerHeight < screen.availHeight || top.window.outerWidth <
screen.availWidth)
{ top.window.outerHeight = 600;
top.window.outerWidth = 800; }
}
</script>
jsebrech
07-06-2007, 07:54 AM
Never mind, the other threads have the correct answer.
atomic
07-06-2007, 05:30 PM
Never mind, the other threads have the correct answer.
What's that about? :confused:
jsebrech
07-09-2007, 12:16 PM
What's that about? :confused:
I think the threads were merged. That post was not about your answer being incorrect, it was about my own answer being incorrect. Yours is correct.
atomic
07-09-2007, 03:18 PM
Yeah! Moderators should take more care when merging & moving threads, so that the new thread makes sense... If often doesn't, if you're unaware that it's been merged.
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.