473,394 Members | 1,124 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Resize a browser window to content

Hello,

I am trying to open a window with a graphic in it and have the window
be exactly the correct size of the image. Is there anyway to do this
that will work on any browser on any OS????

Thanks

David
Jul 23 '05 #1
4 2613
In article <d3**************************@posting.google.com >,
ib*********@yahoo.com enlightened us with...
Hello,

I am trying to open a window with a graphic in it and have the window
be exactly the correct size of the image. Is there anyway to do this
that will work on any browser on any OS????


No.
Very little (comparitvely speaking) works on every browser and any OS.

Mozilla-based browsers, including NN6+ and Firefox, allow a user to turn
off the resizing of windows. Thank goodness. Because Mozilla users love
to use tabbed browsing, your resizing the window would resize all the
other tabs. Which sucks. A lot. I have resizing turned off for precisely
this reason.
Opera, which also uses tabbed browsing, might have a similar option.

You can try to open a new window and resize, but it's never guaranteed.
Heck, you can't guarantee your users even have script-enabled browsers
or that they have scripting enabled on their script-enabled browsers.
Yes, text-based browsers are still in use, though not overly common.
Disabled (often visually-impaired) users also have special browsers that
might not even have the option to resize.

Note that people who use tabbed browsers often have links set to open in
a new tab, not a new window. It is also pretty common for them to have
unrequested popups blocked. [1]

[1] discussions about this on various sites I visit have led me to these
conclusions. YMMV.

--
--
~kaeli~
Who is General Failure and why is he reading my hard disk?
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #2
kaeli <ti******@NOSPAM.comcast.net> writes:
Opera, which also uses tabbed browsing, might have a similar option.


Actually, Opera doesn't use tabbed browsing, but rather MDI (Multiple
Document Interface), where each page is a separate window inside the
main application window. When all page windows are maximized, it
looks like tabbed browsing (and resizing fails, since the preferred
size doesn't matter while maximized).

However, Opera does have a similar option (Preferences> Multimedia >
Javascript options > Enable resizing of windows).

If you open a new window with window.open, and specifies sizes, the
window is opened as non-maximized.

/L 'who thinks MDI is superior to simple tabs'
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 23 '05 #3
DU
David Logan wrote:
Hello,

I am trying to open a window with a graphic in it and have the window
be exactly the correct size of the image. Is there anyway to do this
that will work on any browser on any OS????

Thanks

David

Yes but it would not work on all browsers, all possible versions and on
all OSes. It would work on Mozilla-based browsers (rv > 1.3), NS 7.x,
Opera 7.x, MSIE 6.
Depending on the fact that the sub-window with a graphic in it is in
fact an .html file or it is a graphic file only, the answer would be
differential. Can you clarify this? Also, can you provide an url to show
what you have done so far?

DU
Jul 23 '05 #4
DU
kaeli wrote:
In article <d3**************************@posting.google.com >,
ib*********@yahoo.com enlightened us with...
Hello,

I am trying to open a window with a graphic in it and have the window
be exactly the correct size of the image. Is there anyway to do this
that will work on any browser on any OS????

No.
Very little (comparitvely speaking) works on every browser and any OS.

Mozilla-based browsers, including NN6+ and Firefox, allow a user to turn
off the resizing of windows. Thank goodness. Because Mozilla users love
to use tabbed browsing, your resizing the window would resize all the
other tabs. Which sucks. A lot. I have resizing turned off for precisely
this reason.


I think the OP miswrote the subject line with "Resize" when his post
originally meant to size, to fit the window according to an image (html
or image?) size.

I agree with what you say overall.

DU
Opera, which also uses tabbed browsing, might have a similar option.

You can try to open a new window and resize, but it's never guaranteed.
Heck, you can't guarantee your users even have script-enabled browsers
or that they have scripting enabled on their script-enabled browsers.
Yes, text-based browsers are still in use, though not overly common.
Disabled (often visually-impaired) users also have special browsers that
might not even have the option to resize.

Note that people who use tabbed browsers often have links set to open in
a new tab, not a new window. It is also pretty common for them to have
unrequested popups blocked. [1]

[1] discussions about this on various sites I visit have led me to these
conclusions. YMMV.

Jul 23 '05 #5

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

Similar topics

6
by: Weng kin | last post by:
Hi everyone, I have a problem trying to load an image without the image resizing itself to fit into the window. My simple javascript is as follows: function viewImage(filename) { features =...
2
by: Charles Packer | last post by:
From one of the online Javascript tutorials, I learned how to open a new window and set its size. I'm building a page that has several small photographs, and I want to let the viewer examine...
6
by: David Hayes | last post by:
juglesh <juglesh@nospamRadioKDUG.com> wrote in "Re: how to maximize the browser window that fits the monitor size?" (Saturday, January 01, 2005 3:12 AM): > > >I want to maximize the browser...
2
by: Peter | last post by:
I would like to automatically resize a window to its content. I was thinking of using an outer table to detect the size of my content, then use window.resizeTo( ). The problem is I'm not sure...
14
by: franz | last post by:
hallo everyone, i have a popup window 500x400px centered in the middle of the screen and inside it there's a mini-photogallery. what i want is to click on a thumbnail and open in the same window a...
4
by: al | last post by:
Hi, When Resizing (maximize and minimize actions) a window, does IE 5.0 adjust asp.net page controls so they are aligned, or do i have to do it(aligning) in code? MTIA, Grawsha
69
by: RC | last post by:
I know how to do this in JavaScript by window.open("newFile.html", "newTarget", "scrollbars=no,resizable=0,width=200,height=200"); The browser will open a new window size 200x200, not allow...
0
by: msoliver | last post by:
Issue: I want resize handlers within an iframe to be called when the main window changes size. Alternatively, I'd like to know how to propagate a resize event handled by the main window to iframe...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.