Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Archived:OnResize event in Symbian Web Runtime does not fire on Nokia 5800 (Known Issue)

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

The article is believed to be still valid for the original topic scope.

Article Metadata
Tested with
Devices(s): Nokia 5800 XpressMusic sw. 10.0.010
Platform(s): S60 5th Edition
S60 5th Edition
Keywords: onResize
Created: User:Technical writer 1 (24 Feb 2009)
Last edited: hamishwillee (01 Aug 2012)


Window.onResize event is not received by Web Runtime Widgets on Nokia 5800 XpressMusic with sw 10.0.010. These events should occur when the screen orientation is changed.

How to reproduce

Have a function launch on Window.onResize. Nothing happens.


This issue has been fixed from sw 11.0.008 onwards.


  window.onload = init; //set up events etc...
window.onresize = checkOrientation; // support for the regular function
var previousHeight = window.innerHeight; // record the current height
function init(){
// Heading of the test application
var header = document.getElementById("heading_txt");
header.innerHTML ="User agent tester";
var txt = document.getElementById("text_txt");
//This is the actual code
var usrAgnt = navigator.userAgent;
//No support for window.onresize, therefore polling
setInterval("checkOrientation()", 500);
txt.innerHTML = "onResize is NOT supported";
//onResize is supported
txt.innerHTML = "onResize IS supported";
//The function that get's called when screen orientation is switch
function checkOrientation(){
if(window.innerHeight != previousHeight){
previousHeight = window.innerHeight;
if(window.innerHeight > 360){
//Switch to portrait here
alert("Resize to portrait");
//Switch to landscape here here
alert("Resize to landscape");
This page was last modified on 1 August 2012, at 04:41.
28 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.