the "right" way to do this is to use Object detection (this is what
Apple recommends as user agent strings may be spoofed and are not a
good way of deciding what content to show). For example, if you want
to check for if orientation is supported (1.1.1 and higher), you can
use the following code:
if (window.orientation) { updateOrientation(); } else
{ doOldSchoolUpdatingHere(); }
On Jan 11, 2:01 pm, Andy Fuchs <[EMAIL PROTECTED]> wrote:
> I think that was not the question, but: How do I know which version of
> Safari is on which iPhone's firmware and what is supported, so I can switch
> my .js includes appropriately.
>
> andy
>
> at 11.01.2008 18:42 Uhr, Manish Sharma wrote:
>
> > You may use the user-agent string coming from the device. The way to access
> > it through javascript is calling window.navigator.userAgent.
>
> > Thanks,
> > Manish
>
> > On Jan 11, 2008 6:09 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> >> Doesn't anyone have a solution for this? I mean, is no one here in the
> >> need to figure out the iPhone version he's running on?
>
> >> On Jan 9, 3:21pm, Thomas Tempelmann <[EMAIL PROTECTED]> wrote:
> >>> I like to use the onorientationchange event in my JS code designed for
> >>> iPhone & iPod Touch.
>
> >>> Since that feature has been introduced in the v1.1.1 firmware version, I
> >>> need to still use the old (timer) way for previous firmware versions.
>
> >>> How do I detect which iPhone firmware is running? I know I can check the
> >>> webkit version, but I can't find a list of all webkit versions related
> >> to
> >>> the firmware releases.
>
> >>> Or, is there a way to test whether an event is supported?
>
> >>> Thomas
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---