Ipad Orientation

Hello and sorry for my bad english.

Where is the best way to know is the ipad or iphone is in horizontal or vertical mode?

You might check with Javascript code the page width & height.


Do you have a sample code with intraweb because I can not.
I don't know the Intraweb event how to put the javascript.

Sorry, no ready to use sample right now, might look into that when there is less workload.

See ScriptEvents property on IW components to insert JS code there.

I found a solution with the javascript property of the intraweb form.

var supportsOrientationChange = "onorientationchange" in window, orientationEvent = supportsOrientationChange ? "orientationchange" : "resize";

window.addEventListener(orientationEvent, function()


if( window.orientation == 90 || window.orientation == -90 )


}, false);