Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Resize a browser window to content

Reply
Thread Tools

Resize a browser window to content

 
 
David Logan
Guest
Posts: n/a
 
      07-14-2004
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
 
Reply With Quote
 
 
 
 
kaeli
Guest
Posts: n/a
 
      07-14-2004
In article <(E-Mail Removed) >,
http://www.velocityreviews.com/forums/(E-Mail Removed) 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

 
Reply With Quote
 
 
 
 
Lasse Reichstein Nielsen
Guest
Posts: n/a
 
      07-14-2004
kaeli <(E-Mail Removed)> 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 - (E-Mail Removed)
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
 
Reply With Quote
 
DU
Guest
Posts: n/a
 
      07-14-2004
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
 
Reply With Quote
 
DU
Guest
Posts: n/a
 
      07-14-2004
kaeli wrote:

> In article <(E-Mail Removed) >,
> (E-Mail Removed) 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.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
resize browser window on load chris HTML 43 02-17-2011 03:43 AM
Browser window resize commands Lukan Firefox 3 03-17-2008 04:59 AM
resize a browser window in aspnet? Jim Bancroft ASP .Net 2 05-26-2005 12:08 AM
How to resize all images sizes and coordinates of the images on resize browser rams.kakara@gmail.com ASP General 2 02-13-2005 09:03 AM
Can I resize Excel window from IE browser? Peter Noneley Javascript 3 09-05-2003 01:31 PM



Advertisments