<script>
window.resizeTo(600,800);
</SCRIPT>
<script LANGUAGE="javascript">
var width = screen.width
var height = screen.height
document.write("<BODY onUnload=window.resizeTo("+width+ "," +height+")>")
</SCRIPT>
in this code you just need to change the numbers 600,800 to the size you want. make sure it is most likely to be used by your viewers
and then place this scripts just as they are here right after the first body tag on your web page anywere else will cause it not to work with out errors so it needs to be the first thing in between the body tags and before any content.
if you look at the script you see it is not telling the type of script for the first one. LEAVE IT THAT WAY if you make it say what type of script it is. it will not work.
the second one is re writing the body tag so it needs to be after the body tag to see it. and it just tells it to put the broswer back to the size it was before you changed it. when the viewer closes you page.
want to see it in action?
http://www.angelfire.lycos.com/tx5/rovingc...agentsongs.html
and click on the song of your choice if you dont have the msagents dont worry it will still change the size from your large one to the 600 x 800 size
and then back again when you leave. so not having the agents is not a big deal when you just want to see the code above work. just set your screen to a larger size then 600 x 800 because that is what i change it too.
enjoy
Archived topic from Iceteks, old topic ID:304, old post ID:1502
Resizing A Viewers Browswer Window
- rovingcowboy
- Posts: 1504
- Joined: Wed Dec 18, 2002 10:14 pm
Resizing A Viewers Browswer Window
roving cowboy/ keith
- Red Squirrel
- Posts: 29209
- Joined: Wed Dec 18, 2002 12:14 am
- Location: Northern Ontario
- Contact:
Resizing A Viewers Browswer Window
cool, I think I'll have to impliment that on the photo gallery for when it opens a new window to view a picture, but I'd need to maximized it would be better though.
By the way I think I'll turn this section into general programming and not just C++
Archived topic from Iceteks, old topic ID:304, old post ID:1517
By the way I think I'll turn this section into general programming and not just C++
Archived topic from Iceteks, old topic ID:304, old post ID:1517
Honk if you love Jesus, text if you want to meet Him!
-
- Posts: 5140
- Joined: Fri Jan 10, 2003 1:14 am
Resizing A Viewers Browswer Window
Thank you.
But, I hate when people resize my browser window.
Archived topic from Iceteks, old topic ID:304, old post ID:1519
But, I hate when people resize my browser window.
Archived topic from Iceteks, old topic ID:304, old post ID:1519
- rovingcowboy
- Posts: 1504
- Joined: Wed Dec 18, 2002 10:14 pm
Resizing A Viewers Browswer Window
but with this script i found it atleast puts it back to the same size you had it at so you dont get really mad
Archived topic from Iceteks, old topic ID:304, old post ID:1522
Archived topic from Iceteks, old topic ID:304, old post ID:1522
roving cowboy/ keith
-
- Posts: 5140
- Joined: Fri Jan 10, 2003 1:14 am
Resizing A Viewers Browswer Window
That is good. I won't get too angry then....
Archived topic from Iceteks, old topic ID:304, old post ID:1531
Archived topic from Iceteks, old topic ID:304, old post ID:1531