Mark Forums Read
  #1  
Old 04-08-2009, 06:40 AM
ajit22 ajit22 is offline
Member
 
Join Date: Jan 2009
Posts: 54
ajit22 is on a distinguished road
Default set a window's size when it is opened

Put this as early in the <head> of the page as possible:

<script>
self.resizeTo(100,200);
</script>

Set the dimensions in the parentheses. The first number is the width; the second is the height.
__________________
New York Web design
Website design

Reply With Quote
 #Add to Ads's Reputation  
OldSponsored Ads
Ads AdsPromoter is online
Member
 
Join Date: LongTime
Posts: 1100
Ads is on a distinguished road
Default New Sponsored Ads



This message will go away once you are registered. Also, by registering, you will have access to all post topics, communicate privately with other members (PM), respond to polls, upload graphics, and access other special features! Registration is fast, simple and absolutely free so please Click Here to join our Web Hosting community today!
Reply With Quote
  #2  
Old 06-20-2009, 09:42 AM
gkumar gkumar is offline
Senior Member
 
Join Date: Jun 2009
Posts: 203
gkumar is on a distinguished road
Default set a window's size when it is opened

You may want to control the size of the browser window which opens when a viewer accesses your web page. The default behavior is for the browser window to open at its last setting (e.g. maximized, or resized according to the viewer's preference). You can force the browser window to open at a specific pixel size (width and height). The viewer can still resize, maximize, or minimize the window once it has opened, but re-opening or refreshing the window will pull it back to the settings you have defined. You will use some simple JavaScript to perform this function. You need to add code to the <head> section and the <body> tag.


In the <head> section
Quote:
<script>
function changeScreenSize(w,h)
{
window.resizeTo( w,h )
}
</script>
In the <body> tag
Quote:
<body onload="changeScreenSize(500,300)">
n this example, the window size has been set to 500 pixels wide and 300 pixels high. Experiment with different width/height pixel values to get the effect you want.
Reply With Quote
 #Add to Ads's Reputation  
OldSponsored Ads
Ads AdsPromoter is online
Member
 
Join Date: LongTime
Posts: 1100
Ads is on a distinguished road
Default New Sponsored Ads



This message will go away once you are registered. Also, by registering, you will have access to all post topics, communicate privately with other members (PM), respond to polls, upload graphics, and access other special features! Registration is fast, simple and absolutely free so please Click Here to join our Web Hosting community today!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 04:29 PM.


Powered by vBulletin Version 3.6.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 2.4.0