Reputation: 81
I'm writing an order entry web application. I don't think it matters here, but the server side is in .Net MVC.
In the order page, each line is a separate html form with a unique identifier. When a user changes the order quantity, the line is submitted and refreshed with an AJAX call.
Here's the basic setup:
function submitLine(id) {
var selector = "form#Frm" + id;
$(selector).trigger("onsubmit");
}
<td class="order-qty">
<input id="Item_CaseQty" name="Item.CaseQty" onblur="submitLine('ffdc1d61-9025-416b-b62e-09691cf64bb8');" type="text" value="5" />
</td>
This works fine in (at least) IE8, Chrome, and Android.
It does not work on iPad Safari. I have some other, less critical, defects on the iPad that seem to be related to focus/blur issues. Are these events not supported on iPad? If not, are there others that I could use instead.
Upvotes: 0
Views: 1714
Reputation: 81
I was completely wrong about the cause of this error and about the relevance of .Net MVC. I using MVC 2.0 and the Ajax.BeginForm() helper to implement the Ajax update. I found out that it's Ajax.BeginForm that doesn't work correctly in Safari. This appears to be true of all Safari implementations, not just the iPad. I fixed the problem by removing the MVC helper, and using jQuery.Ajax() instead, along the lines described here: Using Ajax.BeginForm with ASP.NET MVC 3 Razor
Upvotes: 1