Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #24588
| Newsgroups | comp.lang.javascript |
|---|---|
| Subject | Re: window.open allowing image to scale |
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
| References | <_oqdnbF7roH_oBDOnZ2dnUVZ_qudnZ2d@westnet.com.au> <icydndWnyInWohDOnZ2dnUVZ_oKdnZ2d@westnet.com.au> |
| Date | 2014-06-03 08:55 +0200 |
| Message-ID | <XnsA3415AC3A73ECeejj99@194.109.133.133> (permalink) |
Andrew Poulos <ap_prog@hotmail.com> wrote on 03 jun 2014 in
comp.lang.javascript:
> On 3/06/2014 1:11 PM, Andrew Poulos wrote:
>> I need to be able to popup a window to enable users to see the image
>> they've selected. The simplest way I thought of using was to point
>> window.open to the image itself.
>>
>> This works but the image will rescale (at least it does in IE 9) if the
>> popup window is resized to smaller than the image's "natural" size:
>>
>> var myPop = window.open(
>> "images/puzzle.jpg",
>> "",
>> "width=240,height=320,resizable,status=0"
It should be: resizable=1
>> );
>>
>>
>> Is there a way to keep the image from scaling?
>
> To answer my own question, I just did this
>
> var myPop = window.open("","","width=240,height=320,resizable,status=0);
> myPop.document.open();
this .document.open() is not needed, it is implicit.
> myPop.document.write("<img src='images/puzzle.jpg' alt=''>");
> myPop.document.close();
this .document.close() is not needed,
unless you want a second .document.write()
to overwrite the document by inducing the implicit .open()
> and the image now doesn't scale when the window is made smaller than the
> image.
Okay.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
window.open allowing image to scale Andrew Poulos <ap_prog@hotmail.com> - 2014-06-03 13:11 +1000
Re: window.open allowing image to scale Andrew Poulos <ap_prog@hotmail.com> - 2014-06-03 13:19 +1000
Re: window.open allowing image to scale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-06-03 08:55 +0200
Re: window.open allowing image to scale Andrew Poulos <ap_prog@hotmail.com> - 2014-06-03 18:38 +1000
Re: window.open allowing image to scale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-06-03 10:58 +0200
Re: window.open allowing image to scale Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-04 11:28 +0200
Re: window.open allowing image to scale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-06-04 15:01 +0200
Re: window.open allowing image to scale Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-04 15:16 +0200
Re: window.open allowing image to scale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-06-04 16:51 +0200
Re: window.open allowing image to scale John Harris <niam@jghnorth.org.uk.invalid> - 2014-06-04 14:47 +0100
Re: window.open allowing image to scale Christoph Michael Becker <cmbecker69@arcor.de> - 2014-06-04 17:35 +0200
Re: window.open allowing image to scale Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-04 18:18 +0200
Re: window.open allowing image to scale John Harris <niam@jghnorth.org.uk.invalid> - 2014-06-05 11:12 +0100
Re: window.open allowing image to scale John Harris <niam@jghnorth.org.uk.invalid> - 2014-06-05 11:03 +0100
Re: window.open allowing image to scale Christoph Michael Becker <cmbecker69@arcor.de> - 2014-06-05 17:43 +0200
Re: window.open allowing image to scale John Harris <niam@jghnorth.org.uk.invalid> - 2014-06-06 11:09 +0100
Re: window.open allowing image to scale Dr J R Stockton <reply1400@merlyn.demon.co.uk.invalid> - 2014-06-08 19:41 +0100
csiph-web