Quote:
Originally Posted by smasher
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.