473,671 Members | 2,209 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Resizable pop up windows in IE

Morning All,

I have a web application where we pop up a little calendar control in a
new window to allow users to choose dates. For cross-browser purposes,
this is done via window.open (with some code to make it behave like a
modal dialog) and I set the width and height of the window such that
the controls fit nicely and it all looks good.

I have some users who are unable to see the OK and Cancel buttons at
the bottom of the window due to some display settings on their
machines. OK, I though, I'll just make the window resizable and they
can then take control. How naive of me! Why on earth does IE decide
that the minute I put 'resizable=yes' into my attributes for the new
window that it should ignore the size?

I know I can do window.resizeTo in the onload of the calendar window,
but I'm not keen on the resizing of the window.

I don't suppose anyone knows of a way to have IE open a resizable
window of a given size without the resizeTo?

Thanks,
Al.

Oct 20 '06 #1
3 2170
ASM
Al Henderson a écrit :
>
I don't suppose anyone knows of a way to have IE open a resizable
window of a given size without the resizeTo?
var truc = false;

function pop(page) {
if(!truc || truc.closed)
truc = window.open('', '','width=250,h eight=125,resiz able=1');
truc.location = page;
truc.focus();
}
Variations :

var w = 225;
var h = 131;
attributes = 'width='+w+',he ight='+h;
attrResiz = attributes+',re sizable=1';
attrScroll = attributes+',sc rollbars=1';
attrScrollResiz = attrResiz+',scr ollbars=1';

truc = window.open('', '',attrResiz);
Possible attributes to mix :

top=125 (margin hight in pixels)
left=... (margin left)
width= (width in px)
height=
scrollbars=0/1 (0 or 1 = no or yes)
menu=0/1
menubar=0/1 (on Mac menu can't be disabled)
satus=0/1 (FF always displays status bar)
location=0/1
toolbar=0/1
history=0/1 (IE only)
resizable=0/1 (if 0 in FireFox the resizeTo is disabled)

if no attribute : normal window
if some attributes, those ignored would be to 'no'

--
ASM
Oct 20 '06 #2
Al Henderson wrote:
Morning All,

I have a web application where we pop up a little calendar control in a
new window to allow users to choose dates. For cross-browser purposes,
this is done via window.open (with some code to make it behave like a
modal dialog) and I set the width and height of the window such that
the controls fit nicely and it all looks good.

I have some users who are unable to see the OK and Cancel buttons at
the bottom of the window due to some display settings on their
machines. OK, I though, I'll just make the window resizable and they
can then take control. How naive of me! Why on earth does IE decide
that the minute I put 'resizable=yes' into my attributes for the new
window that it should ignore the size?

I know I can do window.resizeTo in the onload of the calendar window,
but I'm not keen on the resizing of the window.

I don't suppose anyone knows of a way to have IE open a resizable
window of a given size without the resizeTo?
YUK! Don't use new windows - you'll run into these browser compatibility issues! Use a proper Calendar widget: http://developer.yahoo.com/yui/examp...dar/index.html

If you need to pop up windows with extra info in, us a Dialog: http://developer.yahoo.com/yui/examp...ner/index.html

Basically, use the YAHOO UI!

Nige
Oct 21 '06 #3
This doesn't work (and is pretty close to the code I had already!). If
I have:

var newWindow = false;

function NewWindow()
{
if(!newWindow || newWindow.close d)
{
newWindow = window.open("", "", "width=250,heig ht=125,resizabl e=1");
newWindow.locat ion = "http://..../test.html";
newWindow.focus ();
}
}

and I call NewWindow from a button onclick, then I get a new browser
window the same size as my parent - it ignores the size specifications.
Am I missing something?

Thanks,
Al.

ASM wrote:
Al Henderson a écrit :

I don't suppose anyone knows of a way to have IE open a resizable
window of a given size without the resizeTo?

var truc = false;

function pop(page) {
if(!truc || truc.closed)
truc = window.open('', '','width=250,h eight=125,resiz able=1');
truc.location = page;
truc.focus();
}
Variations :

var w = 225;
var h = 131;
attributes = 'width='+w+',he ight='+h;
attrResiz = attributes+',re sizable=1';
attrScroll = attributes+',sc rollbars=1';
attrScrollResiz = attrResiz+',scr ollbars=1';

truc = window.open('', '',attrResiz);
Possible attributes to mix :

top=125 (margin hight in pixels)
left=... (margin left)
width= (width in px)
height=
scrollbars=0/1 (0 or 1 = no or yes)
menu=0/1
menubar=0/1 (on Mac menu can't be disabled)
satus=0/1 (FF always displays status bar)
location=0/1
toolbar=0/1
history=0/1 (IE only)
resizable=0/1 (if 0 in FireFox the resizeTo is disabled)

if no attribute : normal window
if some attributes, those ignored would be to 'no'

--
ASM
Oct 23 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2422
by: VR | last post by:
First, greetings to everyone :) I'm doing a university seminar & I've encountered a problem. I have a gallery with thumbnails linked on pictures. What I want is popup to be opened with dimensions of linked picture after clicking on a thumbnail. I found javascript which is compatible with IE, Firefox & Opera but I can't get it to work. All I get is this http://www.justfonts.com/tini/problem.html (thumbnail dissapeared).
1
1960
by: Catherine Jo Morgan | last post by:
If I make a form in Access 2002 without thinking about making it resizable in different browser windows, can I add this feature later? Or do I need to do something about it right at the start, as I'm first designing the form? Obviously I don't know how to do this, either. What's the simplest way? TIA
4
8131
by: sam.s.kong | last post by:
Hello! I opened a new window using 'resizable=no'. Can the child window make itself resizable even if it's opened with 'resizable=no'? For example: <body onload="javascript: window.resizable=true;">
3
2010
by: Anupama | last post by:
Is it possible that first I make my window resizable,than if window is less than a fixed size I can make my window not resizable?Better to say can I change resizable feature during runtime?If possible,than how?
11
2078
by: Aaron Gray | last post by:
Hi, I have put together a bit of JavaScript to make a square resizable canvas :- http://www.aarongray.org/Test/JavaScript/resizable.html Problems I have :- a) I cannot seem to center it horrizontally b) It does not appear to be totaly square on either of my machines.
3
2016
by: guarumal | last post by:
Hi, I am try to make a window resizable but it does not work. I am using in the child window <body onload="javascript: window.resizable=true;"> What else can I do?
3
4440
by: Thierry Loiseau | last post by:
Hello, If I do : w=window.open('','a','resizable=no, width=400, height=400, toto=3'); can I modify 'w' to resizable=yes ? Thank you, Thierry
2
2526
by: Rastko Soskic | last post by:
Hi everyone! I need some tips, ideas, suggestions on best approach to create "resizable panels". The best example what I am trying to achieve could be MSN mail (hotmail) which have separate, resizable panels for folders (inbox, sent, etc.) and for messages. Maybe someone knows exactly how that "splitter" functionality is implemented :) Those MVPs should know :)))) Thanks in advance :)
1
16960
by: since | last post by:
I figured I would post my solution to the following. Resizable column tables. Search and replace values in a table. (IE only) Scrollable tables. Sortable tables. It is based on a lot examples I found on the web. Works in IE and mozilla. http://www.imaputz.com/cssStuff/bigFourVersion.html
0
8476
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8393
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8914
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8820
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8670
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6223
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2051
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1809
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.