views:

25

answers:

0

Hi,

I am using 3.2 and 4.0 iOs and I am trying to run html file in UIWebView. the html file contains to following lines:

var pwint = function(text) { var output = document.getElementById('output'); output.innerHTML = output.innerHTML + text + '\n'; };

var reorient = function(e) { pwint('Window Orientation: ' + window.orientation); };

window.onorientationchange = reorient

The problem is that window.orientation always returns '0' while I run the same code in safari it works as expected.

any ideas?

Zohar