Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OnSubmit with Mobile Safari

While using jCart I noticed that it did not work on the iPhone. After some testing (and speaking with the developer on the jcart forum ) it seems that it fails to call the submit handler when clicking a submit button:

$('form.jcart').submit(function(){...});

I have tried changing this to:

$("form.jcart input[type='submit']").click(function(){...});
// There were some other code changes needed to make this change work,
// but they are omitted for brevity (they don't impact the problem).

This too does not work. I have found other reports of having problems with .submit/onsubmit on the iPhone, but it doesn't seem like anyone has found a work around for it?

like image 829
Jonathan Avatar asked Jan 03 '10 06:01

Jonathan


1 Answers

Jonathan: I solved the problem we were having. As it turns out, some supplementary code was the source of the issue, and by removing it, everything works normally on the iPhone, iPod Touch.

I've described the solution back on the jCart forum: http://conceptlogic.com/jcart/help/viewtopic.php?f=3&t=316&start=10

like image 99
Justin Ryan Avatar answered Oct 22 '22 23:10

Justin Ryan