Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7524845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T03:10:13+00:00 2026-05-30T03:10:13+00:00

Edit: also happens with $(‘body’).width() and window.outerWidth API 2.3.3 HVGA Before and after rotating

  • 0

Edit: also happens with $(‘body’).width() and window.outerWidth

API 2.3.3 HVGA

Before and after rotating device outputs same screen width (320)

API 3.0 WXGA

Width and height toggle each rotation for example

starts with screenWidth:1280 screenheight: 800
I rotate 90
now has screenWidth:800 screenheight: 1280

so what do I do if I want to make certain changes on rotations
according to dimensions and want to target all APIs? I need a value which is the same for all devices.

Edit: For certain things I need pixel values, not percentages. That’s why I’m using Javascript to calculate size based on screen width. This would work, since screen width is also pixel values and I can keep things proportional. But if sometimes screen.width gives me the current width, and others not, I can’t use it…

-> The thing is I started working with a slider which uses absolute layout and needs pixel values for everything. I don’t want to reimplement the slider, so I decided to calculate dynamically the size of the images and the whole layout using screen width. And initialize the slider with these values.

update

Look here is a similar approach to what I’m trying to do:

http://ryangillespie.com/phonegap.php#/phonegap.php?

Entry of June 18, 2011
“One Screen Resolution to Rule Them All”

I tried also with exactly that example, copy pasting it in my code. But it doesn’t work either. window.outerWidth has the same problems as I’m describing for screen.width (as well as JQuery $(‘body’).width()). It works as long as the device isn’t rotated – it initializes well. But at the first rotation, depending of the device, I get problems. In some it works as expected, in others it interchanges the values, so that I get large width in portrait mode and short in landscape, in others it gives fixed width and height all time, in others it doesn’t rotate at all….

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T03:10:15+00:00Added an answer on May 30, 2026 at 3:10 am

    Coincidentally I found that this works:

    $(window).resize(function() {
        updateScaling($('body').width());
    }); 
    

    This is always called and passes correct width. As far as I remember it also works with screen.width

    In updateScaling I calculate a scalingFactor and adjust my elements.

    I tried out responsive CSS, media queries and so on, but at some point it didn’t make sense anymore, because I have anyways to recalculate the margin of slider’s UL based on current slide and new width – and other stuff which needs script. So I made everything with script.

    I removed window.onorientationchange.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

EDIT: I also have access to ESXLT functions. I have two node sets of
EDIT: There's now a doc page on this so this question is irrelevant, also
Edit: This question was written in 2008, which was like 3 internet ages ago.
Edit: From another question I provided an answer that has links to a lot
EDIT: This was formerly more explicitly titled: - Best solution to stop Kontiki's KHOST.EXE
EDIT: Learned that Webmethods actually uses NLST, not LIST, if that matters Our business
EDIT: This question is more about language engineering than C++ itself. I used C++
EDIT What small things which are too easy to overlook do I need to
Edit : Solved, there was a trigger with a loop on the table (read
edit #2: Question solved halfways. Look below As a follow-up question, does anyone know

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.