Ed Jones5461080
Posts: 0
Joined: Mon Jan 21, 2013 9:12 pm

Jquery fails in IOS, but worked on Android and on view on iPhone via qr code. Window.open?

Hi, Apple says my simple Jquery Select doesn't work.

As in the title, I finished, it worked in the web preview, and it worked when I scanned the qr code with my iPhone. We successfully submitted it to Google Play, and it works when downloaded there.

Yet the Apple review team says that nothing happens when the select item is chosen:
codevar myVar =
Tiggzi('mobileselectmenu1_17').val();

if (myVar == "Westfield"){
window.open("http://www.westfieldinsurance.com/billing/pg.jsp?page=billing");
}
else if (myVar == "Progressive"){
window.open("https://onlineservice4.progressive.com/SelfService.Web/SelfService.aspx?Page=Non-LoggedIn.VerifyPolicy.ProvidePolicyInformation&cntgrp=A");
}
else if (myVar == "Motorists"){
window.open("https://paymentsmotorists.billmatrix.com/");
}
else if (myVar == "Wayne"){
window.open(" http://www.waynemutual.com/wmi/index.htm");
}
else if (myVar == "OhioM"){
window.open("http://public.omig.com/public/services/payment.cfm");
}
/code

Apple says: "We found that your app exhibited one or more bugs, when reviewed on iPad (3rd Generation) running iOS 6.1.3, on both Wi-Fi and cellular networks, which is not in compliance with the App Store Review Guidelines."

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Jquery fails in IOS, but worked on Android and on view on iPhone via qr code. Window.open?

Did you test your app on iOS? I can't really tell you what might be wrong.. are you sure that Tiggzi('mobileselectmenu1_17').val() returns the right value?

Ed Jones5461080
Posts: 0
Joined: Mon Jan 21, 2013 9:12 pm

Jquery fails in IOS, but worked on Android and on view on iPhone via qr code. Window.open?

I tested it via the qr code on iPhone 5.

It seems there may be an issue with select and iPads?
http://stackoverflow.com/questions/10...

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Jquery fails in IOS, but worked on Android and on view on iPhone via qr code. Window.open?

That's running in the Safari browser. Did you test as native app (hybrid)?

Oleg Danchenkov
Posts: 0
Joined: Tue Apr 30, 2013 5:51 pm

Jquery fails in IOS, but worked on Android and on view on iPhone via qr code. Window.open?

Hi Ed.
When you use window.open call the InAppBrowser plugin is used.
To add this plugin you should download xCode project and add this plugin manually. (see http://cordova.apache.org/docs/en/2.5...)
Or you can use childBrowser plugin instead of InAppBrowser
Change your code to
precode
function windowOpen(url) {
var cb;
if(window.plugins) {
cb = window.plugins.childBrowser;
}
if (cb != null) {
cb.showWebPage(url);
}
else {
window.open(url);
};
}
var myVar = Tiggzi('mobileselectmenu1_17').val();
switch (myVar) {
case "Westfield": windowOpen("http://www.westfieldinsurance.com/billing/pg.jsp?page=billing"); break;
case "Progressive": windowOpen("https://onlineservice4.progressive.com/SelfService.Web/SelfService.aspx?Page=Non-LoggedIn.VerifyPolicy.ProvidePolicyInformation&cntgrp=A"); break;
case "Motorists": windowOpen("https://paymentsmotorists.billmatrix.com/"); break;
case "Wayne": windowOpen("http://www.waynemutual.com/wmi/index.htm"); break;
case "OhioM": windowOpen("http://public.omig.com/public/services/payment.cfm"); break;
}
/code/pre

Ed Jones5461080
Posts: 0
Joined: Mon Jan 21, 2013 9:12 pm

Jquery fails in IOS, but worked on Android and on view on iPhone via qr code. Window.open?

Hi, Oleg. Thank you.

1) If I add the plugin, will that fix the iPad click binding issue, or do I still need to bind it to blur (or whatever)?
2) I'm not understanding how I add the Plugin via Appery.io. I'm not seeing direct edit of config.xml. Nor do I get how I would add it via the "App Settings" pages?
3) This issue https://getsatisfaction.com/apperyio/...
seems to say that window.open is just plain broken in Phonegap? Does that change your suggestion?

Thanks
Ed

Oleg Danchenkov
Posts: 0
Joined: Tue Apr 30, 2013 5:51 pm

Jquery fails in IOS, but worked on Android and on view on iPhone via qr code. Window.open?

Hi, Ed.
1) "iPad click binding issue" - I don't get any problems. I have used my code on Value change event for Select or on Button click and all works fine.
2) "how I add the Plugin via Appery.io" - you can't. You can add any plugin to source code (xCode or Eclipse project).
But main plugins are already added to appery projects. And childBrowser among them.
3) Don't use InAppBrowser. Use childBrowser. String window.open(url); in my code is used for browsers (if window.plugins.childBrowser is null).

Return to “Issues”