Blair Cox
Posts: 0
Joined: Thu Jun 04, 2015 2:29 pm

Trying to get InAppBrowser to work

I'm loading a website URL via REST. No problem, all good. But I just want to set the window variable when it is clicked. How do I properly pass the REST data variable to the script??

var ref = window.open(farmMarket_chosen.website_url, '_blank', 'location=yes');

Blair Cox
Posts: 0
Joined: Thu Jun 04, 2015 2:29 pm

Trying to get InAppBrowser to work

Okay, I solved most of it...

This does what I want.... opens the link in the system browser...

var ref = window.open(Apperyio.storage.farmMarket_chosen.get("$['website_url']"), '_system', 'location=yes');

EXCEPT!!!

When I return to the app, it loads the appery.io page in the app and without any naviagtion. huh??

Blair Cox
Posts: 0
Joined: Thu Jun 04, 2015 2:29 pm

Trying to get InAppBrowser to work

Okay figured this out as well...

I'm calling the javascript on-click when clicking a link object. I'm populating the link title using the url from the REST. But since I want to control where the page opens, the url field is not mapped and therefor blank. So, it is 'error loading page' and must default to the appery.io website.

Guess I'll just use a label and instead of the link object and fake it's appearance to be a clickable object.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Trying to get InAppBrowser to work

Hello Blair,

Thank you for the update!

Return to “Issues”