HighDots Forums  

Javascript To Resize Window?

Javascript JavaScript language (comp.lang.javascript)


Discuss Javascript To Resize Window? in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Fleemo
 
Posts: n/a

Default Javascript To Resize Window? - 09-26-2003 , 07:36 PM






Is there any way to have a browser window resize itself when
displaying a new HTML page? I'm using the javascript below to open a
NEW window at a certain size, but I'd prefer the page to load in the
same window, just sized differently. Here's the script I'm currently
using:

<a href="#" onClick="MyWindow=window.open('THE_DOC.html','MyWi ndow','toolbar=no,location=no,directories=no,statu s=yes,menubar=no,scrollbars=yes,resizable=yes,widt h=575,height=805,left=20,top=20');
return false;">

Any input appreciated.

Reply With Quote
  #2  
Old   
DU
 
Posts: n/a

Default Re: Javascript To Resize Window? - 09-26-2003 , 08:20 PM






Fleemo wrote:
Quote:
Is there any way to have a browser window resize itself when
displaying a new HTML page?
Not anymore because many browsers now have user setting prefs that can
disallow scripters from doing that for secondary windows. For windows
not opened by javascript, you need enhanced security privileges.

I'm using the javascript below to open a
Quote:
NEW window at a certain size, but I'd prefer the page to load in the
same window, just sized differently.
No you can not do that without enhanced security privileges.

Here's the script I'm currently
Quote:
using:

a href="#" onClick="MyWindow=window.open('THE_DOC.html','MyWi ndow','toolbar=no,location=no,directories=no,statu s=yes,menubar=no,scrollbars=yes,resizable=yes,widt h=575,height=805,left=20,top=20');
return false;"

The requested window dimensions plus window toolbars and os-dependent
semi-permanent applications like windows taskbar will exceed the height
of the available workspace for application so the popup will never have
the requested height in a majority of cases (for users with 800x600 and
1024x768 scr. res.)

Quote:
Any input appreciated.

DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunc...e7Section.html



Reply With Quote
  #3  
Old   
Fleemo
 
Posts: n/a

Default Re: Javascript To Resize Window? - 09-27-2003 , 08:14 PM



Well, that's disappointing. All the same, thanks for the input.

-F

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



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.