You can't prevent landscape mode, but you can detect it, then adjust  
your page as necessary. iPhone 1.1.1 introduced the  
"onorientiationchange" JavaScript event. You can use it like this:

<body onorientationchange=”orientationChanged()”>

Then in orientationChanged() look at the window.orientation property  
to determine the orientation of the screen. You can then set CSS  
properties accordingly.

As far as input boxes, if you use a form element name that uses 'zip'  
in it, a numerical input box will be used. For example:

<input type="text" name="thisisnotazip" size="20" />


Good luck!

August





On Nov 6, 2007, at 11:39 AM, Steve Finkelstein wrote:

>
> Hi folks,
>
> I was curious if anyone had a code snippet to prevent landscape view
> from happening in an application? I currently haven't optimized my CSS
> to propagate if the phone gets tilted 90 degrees and would like to
> prevent landscape view from creeping up.
>
> Also, one other question, is it possible to force only a numerical
> keyboard to come up for certain input boxes?
>
> Thanks for the help. :-)
>
> - sf
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to