Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #16969
| Date | 2012-10-31 10:29 +1100 |
|---|---|
| From | Andrew Poulos <ap_prog@hotmail.com> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: Confused about window size |
| References | <-LOdnYNMXsgG5hLNnZ2dnUVZ_g-dnZ2d@westnet.com.au> <XnsA0FC5B5916FA2eejj99@194.109.133.133> <NsSdnXbM-rUcPBLNnZ2dnUVZ_oidnZ2d@westnet.com.au> <XnsA0FCAC96CD96Beejj99@194.109.133.133> |
| Message-ID | <xqadnUaGppla_w3NnZ2dnUVZ_uWdnZ2d@westnet.com.au> (permalink) |
On 31/10/2012 2:57 AM, Evertjan. wrote: > Andrew Poulos wrote on 30 okt 2012 in comp.lang.javascript: > >> On 30/10/2012 6:58 PM, Evertjan. wrote: >>> Andrew Poulos wrote on 30 okt 2012 in comp.lang.javascript: >>> >>>> A Samsung's Galaxy S2 screen's size is >>>> 480 x 800. >>>> >>>> When I put an some code in a page and it returned that the window >>>> size >>> is >>>> 240 x 320 >>> >>> I take it that you are talking of an unspecified browser [default, >>> chrome mobile, dolphin, opera mobile, skyfire, etc], as implemented >>> on your [specified] specific android platform, used in an unspecified >>> screen-mode [portrait or landscape] and reported in an unspecified >>> unit [px, mm, inch, etc]? >>> >>> Can you specify the unspecified? >> >> I'm considering using appMobi >> <http://www.appmobi.com/> > [..] >> >> The entire test page is >> >> <!DOCTYPE html> >> <html> >> <head> >> <title>Size</title> >> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> >> >> <script type="text/javascript" charset="utf-8" >> src="http://localhost:58888/_appMobi/appmobi.js"></script> > > http://localhost:58888/_appMobi/appmobi.js" ?????? > > That does not really help testing your problem over the web, does it? > > Why would we need all this code to answer your question? > > Why did you not specify the browser used? > >> >>>> Why the change in proportion? The 240 I can sort of understand but >>>> why isn't reported as >>>> 240 x 400 >>>> ? >>> >>> Perhaps you should indulge us then by making and specifying a >>> web-page for testing! > > Sigh, > so it seems I will have to make a page containing only of: > > ======================================= > <!DOCTYPE HTML> > > <script type='text/javascript'> > alert([window.document.documentElement.clientWidth, > window.document.documentElement.clientHeight]) > </script> > ======================================= > > TRY: > <http://hannivoort.org/test/testForAndrew.asp> > > This shows on my Galaxy-Nexus with Android 4.1.2 and in Chrome-Mobile: > > 980,1413 in portrait-mode > 980,470 in landscape. > > Now if I add: > <meta name="viewport" ... width=device-width > making: > > ======================================= > <!DOCTYPE HTML> > <meta name="viewport" content="width=device-width, initial-scale=1, > maximum-scale=1"> > <script type='text/javascript'> > alert([window.document.documentElement.clientWidth, > window.document.documentElement.clientHeight]) > </script> > ======================================= > > TRY: > <http://hannivoort.org/test/testForAndrewViewport.asp> > > The numbers become: > > 360,519 in portrait-mode > 598,287 in landscape. > > Does this help you in understanding that perhaps[!!!] > the tested Chrome-Mobile will guess a zoom, > using horizontal size is 980px, > unless it is explicitly prescribed differently, > here with the command: "width=device-width" ?? Sorry,my bad. I should've made it clearer that I'm using appMobi to create an android app from HTML5 pages. While I can get a HTML5 page to display the viewport size correctly it fails as an app. I was hoping it was just some misunderstanding on my part but now it seems to be a flaw in appMobi. Andrew Poulos
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Confused about window size Andrew Poulos <ap_prog@hotmail.com> - 2012-10-30 18:02 +1100
Re: Confused about window size "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-10-30 08:58 +0100
Re: Confused about window size Andrew Poulos <ap_prog@hotmail.com> - 2012-10-30 20:44 +1100
Re: Confused about window size "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-10-30 16:57 +0100
Re: Confused about window size Andrew Poulos <ap_prog@hotmail.com> - 2012-10-31 10:29 +1100
Re: Confused about window size "J.R." <groups_jr-1@yahoo.com.br> - 2012-10-31 22:09 -0300
Re: Confused about window size "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-11-01 18:14 +0100
Re: Confused about window size David Mark <dmark.cinsoft@gmail.com> - 2012-10-30 01:39 -0700
csiph-web