Donate SIGN UP

Javascript window resize problem

Avatar Image
mzpresto | 15:18 Mon 10th May 2010 | Internet
10 Answers
Hi I need some code to resize an internet page so that it opens to the maximum screensize
possible onload. I have found some code here that works, but has issues:

http://support.microsoft.com/kb/287171

If I click links on my page then it makes ALL hyperlinks max screen size but I only want the homepage to be the maximum size onload.

Can anyone help, at a guess I'd say the document.all would need chaning to specify just the right page but I don't know the code

Thanks
Gravatar

Answers

1 to 10 of 10rss feed

Best Answer

No best answer has yet been selected by mzpresto. Once a best answer has been selected, it will be shown here.

For more on marking an answer as the "Best Answer", please visit our FAQ.
Not sure why you need the Java code but try this:-

Open an ordinary web page on the Internet.
Go to the top right of the screen and click the Square button (between the _ and the X). Now go to the FILE Menu (top Left) and click on EXIT.
I believe the page should now always open in the FULL position.
(Fingers crossed!!!)
Or have I misunderstood the question??
Yes you have. The poster is asking how they can automatically resize a page on their own website I would imagine.
Question Author
Ok the problem is I have a 3 column table layout on the site which looks AWESOME at max screensize, but people link to my site on their intranet pages and when clicked it opens up in a smaller browser window, approx 75% of the screen.

All I want it to do is force to full screen when they click a link to my page and it opens.

I have already acheived this with the code I posted above, however this means that any links clicked on my page also open full screen and I only want my home page to open full screen

Thanks
Personally I would rather I chose what size my browser windows open and not have it forced on me by anyone else.
I agree, which is why I didn't give any example code.
Ideally, you need to redesign your code so it looks ok on any window size. Try using percentages for your tables instead of fixed numbers.
Question Author
Yeah yeah ok I knew that people would get their backs up about how they don't want their browsers a certain size but you wont ever see it, this not on the world wide web, this is just for an intranet page.

Full screen is important as it shows a lot of imformation and is it too much to ask that if you know how to solve the problem then you might help me anyway without letting your personal opinion of strict browser size guidelines getting in the way?

Sorry I have had no caffeine today :D
it's

<script language="javascipt" type="text/javascript">

self.moveTo(0,0);self.resizeTo(screen.availWi
dth,screen.availHeight);


</script>

But think seriously before you use it, people with large area desktops might not need the browser full size to see everything and by the sounds of it your page is not going to deal with different screen resolutions very well at all.

You would be better making the page suit any size window (within reason).
Question Author
Thanks I appreciate the response, in this particular case it's not an issue as everyone who uses the intranet has a work station with a fixed resolution of 10274 by 768.

I'll give it a go
Question Author
1024 by 768 even lol
That would be some really wide screen monitors you have where you work :)

1 to 10 of 10rss feed

Do you know the answer?

Javascript window resize problem

Answer Question >>

Related Questions

Sorry, we can't find any related questions. Try using the search bar at the top of the page to search for some keywords, or choose a topic and submit your own question.