mobile-safari

Checking online status from an iphone web app

Is there a way to check to see if an iphone is online from a web app. That is, in mobile safari, can I check the online status of the device to see if I should try an ajax call or not. In firefox/regular webkit, this would be if(navigator.onLine) { onlineCode() } ...

iPhone Full Screen Image

How do I go about making an image or section of the page full screen on the iPhone? I have an image that is 480 x 320 and I want to pull that up full screen on the iPhone but it has to be within a webpage so that I can make the image a link back to the previous page. Currently if I drop the image on a blank page and I open it up on the...

How do you add a link that will add an event to your iPhone calendar from safari?

This seems like it should be simple but after a couple hours of googling I have not figured it out. I know I can add iCal links using ICS files, but this does not work on the iPhone. BTW, when I say iPhone I would like it to work on the touch also. Anyone have any luck with this? ...

How do I detect Mobile Safari server side using PHP?

Mobile Safari is a very capable browser, and it can handle my website as it is perfectly. However, there are a few elements on my page that could be optimized for browsing using this device; such as serving specific thumbnails that are smaller than the desktop counterparts to help fit more content into the screen. I would like to know h...

Pattern for wrapping an Asynchronous JavaScript function to make it synchronous

I'm working with a JavaScript API where most of the functions are asynchronous. The API is the WebKit JavaScript Database API which is a binding to a subset of functionality to manipulate SQLite3 databases. I understand the design decision to make things async as to not block and provide a responsive user interface. In my situation I ...

Available iPhone Web Application JavaScript UI Library/Frameworks

I'm starting a web application that will target Mobile Safari on iPhone/iPod Touch. I'm evaluating the available client-side JavaScript/CSS libraries/frameworks that are currently out there. These are the ones I'm currenlty aware of: iUI CiUI UiUIKit WebApp.Net iWebKit Apple's Dashcode Application - not really a standalone library/fr...

How to disable phone number linking in Mobile Safari?

Safari on iPhone automatically creates links for strings of digits that appear to the telephone numbers. I am writing a web page containing an IP address, and Safari is turning that into a phone number link. Is it possible to disable this behavior for a whole page or an element on a page? ...

How do you get the number keypad to come up in an iPhone webApp?

On a web page that is to be displayed on an iPhone, is there a way to get the number pad to come up when the user taps in the field, instead of the qwerty keypad? This guy says here's how to do it, but as of 2.0, this "feature" was disabled. I'm guessing there's some fancy javascript to employ to get around this limitation? ...

Are you writing custom pages for iPhone web apps?

I read the tutorials for web applications and the special rules you can put into style sheets. Are folks finding they can just tweak their style sheets to serve up content to iPhones or do they deliver custom iPhone specific pages? would you bother with this if you were going to create a specific page anyway for mobile users ? (even if ...

Is there a way to create a fullscreen gallery on iPhone through Safari?

I've been creating CSS/Javascript to style an upcoming site differently on iPhone - mostly to enhance usability. On the desktop app, I use slimbox in combination with mootools for an image gallery. This doesn't work on iPhone because it won't show the image fullscreen (safari chrome gets in the way). The solution I have at the moment is ...

Reading cookies using xcode on the iphone

Hi there, I'm trying to read cookies using an xcode application im writing for iphone and testing on emulator. However when I run the code below the value stored in mumcookies is 0. Cookies are allowed via iphone settings and I also used mobile safari to navigate to gmail, hotmail and other cookie setting sites to increase cookie count o...

iPhone web applications and specific input types

I remember seeing a tutorial a while back on this but am unable to re-Google it. Supposedly there is a way to get Safari on the iPhone to give keyboards other than the default. It went something along the lines of this, where certain keywords in the input name attribute triggered it... This would give the default keyboard: <input type...

Why doesn't @contenteditable work on the iPhone?

Safari HTML Reference: Supported Attributes says: contenteditable If true, the element can be edited on the fly; if false, it cannot. Availability Available in Safari 1.2 and later. Available in iPhone OS 1.0 and later. However, on my iPhone, I can't get it to work. Anyone have success with this? You can try it ...

fixed positioning in MobileSafari

Is it possible to position an element fixed relative to the viewport in MobileSafari? As many have noted, position: fixed doesn't work, but Gmail just came out with a solution that almost is what I want see the floating menu bar on the message view. Getting real-time scroll events in JavaScript would also be a reasonable solution. ...

How do I detect when the iPhone goes into landscape mode via JavaScript? Is there an event for this?

I’m writing a web site targeted at the iPhone. I’d like to set a class on the <body> element when the iPhone’s orientation changes (i.e. when the user turns the phone into landscape and/or portait mode). Can I detect this change via JavaScript? Is there an event for this? ...

iPhone Mobile App (safari): no onblur? wrong onfocus? no onbeforeunload? WTF?

So I just made my web-application "iPhone Friendly". So you can add it to your home screen and it has an icon, no chroming, etc etc. The problem is that I want to display a custom splash-screen every time it is opened from the iPhone home screen. Right now it just shows the last screen viewed while it basically runs a refresh. I have...

Preventing iPhone scaling when rotated

When I rotate my iPhone into landscape mode, the iPhone automatically bumps the text size up. What is the best way to prevent this? I'd like rotation to give the visitor more text to read, not a larger font. Is JavaScript like this the only way to go? ...

How to test on the IPhone without having access to one?

Want to write a site for the iphone, but I don't have one and I don't know anyone who has one. Is there a way to develop for it without having access to one, maybe apple has some sort of sim for this or something. Anyone know of anything? ...

jqModal displaying incorrectly in Mobile Safari

I have a jQModal window on my site that has its content populated by an Ajax call. It works fine in all of the desktop browsers, but it fails in Mobile Safari on the iPhone. The overlay and the window itself are displayed on the top of the body of the page, rather than covering the iPhone viewport. If you scroll up, you can see the win...

Embed WAVE-files in iPhones' Mobile Safari

Hi, I host a WAVE-file, which plays fine, it's URL is entered in Mobile Safari directly. Trying to embed it in a simple HTML page shows me a "can't play" icon. What's wrong with my embed code? <embed href="http://localhost/test.wav" type="audio/wav"/> ...