There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
bios black screen blue screen blue screen of death boot computer connection crash css dell display driver drivers email error firefox firefox 3 game hard drive internet internet explorer itunes laptop malware monitor network networking nvidia outlook outlook 2003 outlook express partition password printer problem problems router security slow software sound sprtcmd.exe trojan usb video virus vista windows windows xp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
Open A Page A Certain Height And Width


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
Jaymie1989's Avatar
Senior Member with 333 posts.
 
Join Date: Apr 2007
Location: Gloucester, UK
Experience: Windows XP & Vista = Inte
12-Jan-2008, 08:27 PM #1
Open A Page A Certain Height And Width
Hi,

I want to make one of my pages open a certain height and width. I have searched google for the HTML for it and nothing works.

So what can i use?
MMJ's Avatar
MMJ MMJ is offline
Distinguished Member with 3,256 posts.
 
Join Date: Oct 2006
13-Jan-2008, 02:26 AM #2
Not a good practice but Google "window.open".
Jaymie1989's Avatar
Senior Member with 333 posts.
 
Join Date: Apr 2007
Location: Gloucester, UK
Experience: Windows XP & Vista = Inte
13-Jan-2008, 09:16 AM #3
All it came up with is Java Script codes.

I have no idea about java script
MMJ's Avatar
MMJ MMJ is offline
Distinguished Member with 3,256 posts.
 
Join Date: Oct 2006
13-Jan-2008, 09:49 AM #4
Quote:
Originally Posted by Jaymie1989 View Post
All it came up with is Java Script codes.

I have no idea about java script
I guess you can't do what you want to do than.
Jaymie1989's Avatar
Senior Member with 333 posts.
 
Join Date: Apr 2007
Location: Gloucester, UK
Experience: Windows XP & Vista = Inte
13-Jan-2008, 11:00 AM #5
DO you know any step by steps on how i can do it?

Iv got a java script code but i dont know what to do with it, or insert anything into it
MMJ's Avatar
MMJ MMJ is offline
Distinguished Member with 3,256 posts.
 
Join Date: Oct 2006
13-Jan-2008, 03:46 PM #6
Post your js code than.
Kavik79's Avatar
Junior Member with 13 posts.
 
Join Date: Jan 2008
Experience: Advanced
15-Jan-2008, 01:46 PM #7
try something like this:

on the page you want to control the size of, make your BODY tag look something like the following:

<BODY onload="window.resizeTo(1070,700); window.moveTo(0,0)">

that example would make the window 1070 pixels wide by 700 pixels high and move it to the top left corner of the screen.


just keep in mind what effect this could have on different screen resolutions, ie: you don't want to make it 1070x700 if you have people viewing it with a max resolution of 800x600
Fyzbo's Avatar
Senior Member with 1,777 posts.
 
Join Date: Feb 2002
Location: North Carolina, USA
Experience: Programming-Advanced|EVER
15-Jan-2008, 02:31 PM #8
Why do you have a need to resize and move the browser? You may have a valid reason, but I have never heard one nor can I think of one, most of the time it is done due to a faulty design or a print designer refusing to relinquish full control of the way a webpage is viewed.

A few things to think about. If you resize the persons browser:
-you still won't know the size of your webpage as many people have add-ons/toolbars that take up browser space.
-You may make the browser larger then the screen size and move the resize buttons off screen making it near impossible for the user to do anything.
-You may change the users desired window size which can be very annoying
-If the user is using tabs you will resize all of the tabs not just your page.
-There are many more...

If you move the window:
-You may actually move the browser off screen if they have a multi-desktop display or a laptop which sometimes uses an extra monitor.

So why do you need to resize and move the browser?
Kavik79's Avatar
Junior Member with 13 posts.
 
Join Date: Jan 2008
Experience: Advanced
15-Jan-2008, 02:52 PM #9
Quote:
Originally Posted by Fyzbo View Post
Why do you have a need to resize and move the browser? You may have a valid reason, but I have never heard one nor can I think of one, most of the time it is done due to a faulty design or a print designer refusing to relinquish full control of the way a webpage is viewed.
I can't speak for the original poster, but to answer your question of why it would ever need to be used: I can say that the reason I had that code sitting around was from a page I was asked to design at work a year or so ago. We wanted a "What's New" announcement page to pop up when users logged into a certain page. It was moved to the 0,0 location to ensure that people with multiple windows open on screen would be likely to see it.
I've also seen it used on many pages when a small pop up would be opened with, say, a short description; a deffinition of a word; or a 'Click here to enlarge this image' scenario.

I'm sure you've seen it put to practical use many many times and just haven't really thought about the fact that it was done in this same way.

For all the dangers you listed about what could go wrong with this method: We all use the same monitors and resolutions, so there wasn't any risk to that, but thank you for backing up and clarrifying my warnings about being careful with how this is used. You deffinately added some good points I hadn't thought off
Fyzbo's Avatar
Senior Member with 1,777 posts.
 
Join Date: Feb 2002
Location: North Carolina, USA
Experience: Programming-Advanced|EVER
15-Jan-2008, 02:57 PM #10
I have never seen a practical use for a popup/new window where a div on the page would not be a better option, especially considering the use of popup blockers.
Kavik79's Avatar
Junior Member with 13 posts.
 
Join Date: Jan 2008
Experience: Advanced
15-Jan-2008, 03:11 PM #11
that may be, but the request was for sizing a window, we don't know if it's for a pop-up or not, that was just one example i gave. Without straying any further from the original topic, I'm just trying to answer the question that was asked, not change anyone's mind on the best way to code their site.

Jaymie, let us know how that works out for you
Jaymie1989's Avatar
Senior Member with 333 posts.
 
Join Date: Apr 2007
Location: Gloucester, UK
Experience: Windows XP & Vista = Inte
15-Jan-2008, 04:13 PM #12
I sorted it now thanks
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 03:29 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.