Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 06-02-2009, 01:30 PM   #4 (permalink)
scotopia
Registered Member
 
scotopia's Avatar
 
Join Date: Oct 2008
Posts: 1,661
Default

Quote:
Originally Posted by smasher View Post
Fist make sure the javascript works when you drag the HTML directly into safari on your desktop machine. If it doesn't work there, you have a more basic problem, and it's easier to debug on the desktop.

Then, see if mobile safari is the problem. You can put your HTML on a server, enable errors in mobile safari (it's in the settings app) and see if you're getting a javascript error in your onsubmit function.

You could also implement webView:didFailLoadWithError: in your UIWebView's delegate - see if you're getting any errors there. That probably won't show any Javascript errors, but you'll probably get something there if your onsubmit function fails, and it tries to go to the (unspecified?) action of your form.

I don't know any way to debug in the UIWebview, other than the old fashioned way - adding alert() boxes at each step of the script to see how far you're getting. On the form submit, inside the function itself, etc.
Thanks for the reply smasher.

It worked on my desktop; and I threw it up on a webserver and browsed to it using mobile safari and that worked as well...hmm.

Last edited by scotopia; 06-02-2009 at 01:32 PM.
scotopia is offline   Reply With Quote
 
Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Online Users: 281
22 members and 259 guests
aderrington, Alexman, AlexTheMighty, arcturus, Bertrand21, Cathy, Chilibird, Corund, evana, Falcon80, fanstarmike, Glnn, headkaze, jhaynie, kalygraphix, mac514, pereorra, shuvo1879, Slecorne, smrtital, Stan Edge, tlikyu
Most users ever online was 779, 05-11-2009 at 09:55 AM.
» Stats
Members: 24,228
Threads: 39,007
Posts: 171,098
Top Poster: smasher (2,570)
Welcome to our newest member, SSL Matrix
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:45 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.