By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,636 Members | 1,213 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,636 IT Pros & Developers. It's quick & easy.

How prevent popup window resizing in browsers.

P: n/a
Anz
function popup_window(pageurl,width,height)
{
mywindow = window.open(pageurl,"mywindow","scrollbars=1,fulls creen =
0,resizable =no,menubar=no,width="+width+",height="+height);
mywindow.focus();
}

Here is the javascript function which i am using, but this doesn't
work in opera?, is there any other script that will work in all
browsers especially in opera ?
Jul 17 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Jul 17, 1:08*pm, Anz wrote:
function popup_window(pageurl,width,height)
{
* * * * mywindow = window.open(pageurl,"mywindow","scrollbars=1,fulls creen =
0,resizable =no,menubar=no,width="+width+",height="+height);
* * * * mywindow.focus();

}

Here is the javascript function which i am using, but this doesn't
work in opera?, is there any other script that will work in all
browsers especially in opera ?

Do you mean that you want to know how to make a window opened with -
window.open - non-resizable in more browsers (including opera). Don't
do that, don't even try it. There are two possible scenarios for the
user: 1. you opened the window at the correct size for the user, and
so the user will never attempt to re-size it and it will not matter
whether it is re-sizable or not. Or 2. you opened the window at the
wrong size for the user and if he/she then cannot re-size it you will
have failed the user.

Opera have noticed that web developers have a strong tendency to not
think about what they are designing and so to end up failing the user,
so they have withdrawn the facility.
Jul 17 '08 #2

P: n/a
Henry wrote:
On Jul 17, 1:08 pm, Anz wrote:
>function popup_window(pageurl,width,height)
{
mywindow = window.open(pageurl,"mywindow","scrollbars=1,fulls creen =
0,resizable =no,menubar=no,width="+width+",height="+height);
mywindow.focus();

}

Here is the javascript function which i am using, but this doesn't
work in opera?, is there any other script that will work in all
browsers especially in opera ?

[...]
Opera have noticed that web developers have a strong tendency to not
think about what they are designing and so to end up failing the user,
so they have withdrawn the facility.
And so has Mozilla.org, per Firefox 3.0 (as discussed recently in
de.c.l.js). However, according to the Client-Side JavaScript 1.3 Reference,
the features string must not contain whitespace, which might be another
reason for it not working.
PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f8*******************@news.demon.co.uk>
Jul 17 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.