SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 121 | Next

Richard Wagner

"Professional iPhone and iPod touch Programming: Building Applications for Mobile Safari"

onresize , which calls an alert()
dialog box each time a window resize is detected. While this is a logical option, the problem with using
window.onresize to detect an orientation change is that this event is triggered inconsistently. It does
not fire off every time. In fact, it usually does not fire until after the third time the orientation changes.
As a result, until Mobile Safari corrects this issue, avoid using onresize .
A much better solution is to poll the browser for orientation changes using the setInterval() function.
Here??™s a basic example:
???http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd???>


Orientation Change Example #1
user-scalable=0;???>