controlling browser window size and bars

D

Derek Johnson

How do you control the size and what bars are on a new window.

I have a page with small pictures of animals on it and want to be able to
click on one to open a new browser window that will be just big enough for a
200 px square image with no address bar, toolbar, status bar or menu bar.

How is this done?
 
E

EightNineThree

Derek Johnson said:
How do you control the size and what bars are on a new window.

I have a page with small pictures of animals on it and want to be able to
click on one to open a new browser window that will be just big enough for a
200 px square image with no address bar, toolbar, status bar or menu bar.

How is this done?

So you want to shit windows all over someone's screen?
That's nice of you.
 
S

SeeSchloss

How do you control the size and what bars are on a new window.
I have a page with small pictures of animals on it and want to be
able to click on one to open a new browser window that will be
just big enough for a 200 px square image with no address bar,
toolbar, status bar or menu bar.

How is this done?

Hehe, bad question. You can expect many answers from angry
people who don't want you to resize their windows as you
like, remove all the bars etc. I understand them. Just make
a link to the picture, and the browsers will be clever
enough not to make a 600px windows to display a 200px
picture.
 
D

DU

Derek said:
How do you control the size and what bars are on a new window.

I have a page with small pictures of animals on it and want to be able to
click on one to open a new browser window that will be just big enough for a
200 px square image with no address bar, toolbar, status bar or menu bar.

How is this done?

When you load a .jpg or .gif in a secondary window, browsers will have a
default css declarations (margins on body) on the document of that
window even if it is not a standard html file. So, your 200x200 image
needs to be in a 230hx220w window in MSIE 6 (because of body
{margin:15px 10px;} and 216hx216w in Mozilla-based browsers (because of
body {margin:8px;}). You can not easily remove such margins; you would
need to create an html file for this. It is not recommendable nor
advisable to remove margins on such windows anyway.

I can understand the no addressbar, no toolbar and no menubar but no
status bar is very much debatable.

Can you provide an url of your webpage? for which browsers you want that
code? What are the dimensions of the images? Are all images hvaing the
same dimensions? Will the images use the same popup window? Can you give
details?

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/doctorunclear/Netscape7/Netscape7Section.html
 
D

DU

DU said:
When you load a .jpg or .gif in a secondary window, browsers will have a
default css declarations (margins on body) on the document of that
window even if it is not a standard html file. So, your 200x200 image
needs to be in a 230hx220w window in MSIE 6 (because of body
{margin:15px 10px;} and 216hx216w in Mozilla-based browsers (because of
body {margin:8px;}). You can not easily remove such margins; you would
need to create an html file for this. It is not recommendable nor
advisable to remove margins on such windows anyway.

I can understand the no addressbar, no toolbar and no menubar but no
status bar is very much debatable.

Can you provide an url of your webpage? for which browsers you want that
code? What are the dimensions of the images? Are all images hvaing the
same dimensions? Will the images use the same popup window? Can you give
details?



Here's a simple page (which can be improved). You can have a bit more
control and customizing power (for the user) if the pointed resource is
an html file and not an image file.

Try the links with javascript enabled and javascript disabled. Try the
links with javascript enabled when the popup is behind the opener.
Right-click the link and open it in a tab or in the same window or in
another window, etc.. Try with a popup blocker.First try with automatic
image resizing off and then on: you'll see you get less with automatic
image resizing on.
In MSIE 6:
Tools/Internet Options.../Advanced tab/Multimedia section/enable
automatic image resizing
In Mozilla:
Edit/Preferences.../Appearance category/Resize large images to fit in
the browser window

Overall, 48 different combinations/possibilities.
All normal cases, possibilities should be covered and they should all be
functioning to their max. possible accessibility and efficiency.
When you do a good testing and a good coding, this is where the page
becomes hassle-free and convenient for the user.
Keep the OpenRequestedPopup.png and its title: this is a WAI guideline
and also mentioned by Nielsen. So far, several major sites are also
using such thumbnail.

http://www10.brinkster.com/doctorunclear/HTMLJavascriptCSS/EnlargeThumbnail.html

Also, you may want to read:
Popup windows and Netscape 7: interactive demos
http://www10.brinkster.com/doctorunclear/Netscape7/Popup/PopupAndNetscape7.html

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/doctorunclear/Netscape7/Netscape7Section.html
 
D

DU

rf said:

Thanks for letting know about this. This is appreciated. :)

You will/should get the vertical scrollbar (looking dimmed, disabled)
but you should not get the horizontal scrollbar. Can you check your
scrollbar setting ? is it 16? If it's more than 16, then the script
needs to compensate for this.

Start/Settings/Control Panel/Display/Appearance tab/Advanced
button/Item:Scrollbar/Size

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/doctorunclear/Netscape7/Netscape7Section.html
 
R

rf

DU said:
Thanks for letting know about this. This is appreciated. :)

You will/should get the vertical scrollbar (looking dimmed, disabled)
but you should not get the horizontal scrollbar. Can you check your
scrollbar setting ? is it 16? If it's more than 16, then the script
needs to compensate for this.

Start/Settings/Control Panel/Display/Appearance tab/Advanced
button/Item:Scrollbar/Size

Yep. It's 18. I never set it so either it's out of the box or it got changed
when I was fiddling around with font size and DPI settings at one stage.
Just goes to show, one can never predict what is hapenning on a viewers
system, even the viewer doesn't know :)

Cheers
Richard.
 
D

DU

rf said:
Yep. It's 18. I never set it so either it's out of the box or it got changed
when I was fiddling around with font size and DPI settings at one stage.

Thank you very much. That is also what I thought. 18 is the default
value on XP. I've adjusted the script function accordingly. Could you
try the demo page again? You should set/get/have a dimmed, grayed
vertical scrollbar (there is nothing to do about this for non html file
loaded in secondary windows via window.open() method) but there should
not be any horizontal scrollbar.
Just goes to show, one can never predict what is hapenning on a viewers
system, even the viewer doesn't know :)

Cheers
Richard.

Excellent comment! Anyone can set the value of the width of scrollbar in
XP to any value: that's an accessibility feature, that's not a bug. And
that's another example (and another reason) convincingly demonstrating
that there is a limit to what scripters can figure out and control on
the user's system, os.

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/doctorunclear/Netscape7/Netscape7Section.html
 
R

rf

Thank you very much. That is also what I thought. 18 is the default
value on XP. I've adjusted the script function accordingly. Could you
try the demo page again?

Fine now.

Cheers
Richard.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top