JSONP not firing on IPad
Posted
by
Gemtag
on Stack Overflow
See other posts from Stack Overflow
or by Gemtag
Published on 2010-12-25T23:46:56Z
Indexed on
2010/12/25
23:54 UTC
Read the original article
Hit count: 187
After trying everything possible I've come to the conclusion this is an issue with IPad Safari. This works in FF, IE, Chrome, and Safari on MacBook. Below is my dumbed-down code. I have 2 separate JSONP calls, This first one works in all browsers including IPad. This simply calls a function based on a blur event
$('#gender').blur(function() { reTarget(); });
function reTarget() { $.getJSON("http://host.com/Jsonpgm?jsoncallback=?", function() { } ); }
Below is where things break. On the same page as the above code is the following, which calls a function based on a submit button click.
$(':submit').bind('click', function(event) { if (checkThis() == false) { return false; }; });
$('form').bind('submit', function(event) { if (checkThis() == false) { return false; }; });
function checkThis() { $.getJSON("http://host.com/Jsonpgm.aspx?jsoncallback=?", function() { } ); }
This code will not fire. I've put alerts right before it and they fire. I look at the web logs and there is no entry for this json call. I would take any suggestions on this. At this point I fear it's a problem with firing jsonp from a submit event.
© Stack Overflow or respective owner