Page 1 of 1

Trying to get InAppBrowser to work

Posted: Fri Jun 12, 2015 4:44 pm
by Blair Cox

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');


Trying to get InAppBrowser to work

Posted: Fri Jun 12, 2015 5:01 pm
by Blair Cox

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??


Trying to get InAppBrowser to work

Posted: Fri Jun 12, 2015 5:29 pm
by Blair Cox

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.


Trying to get InAppBrowser to work

Posted: Fri Jun 12, 2015 8:47 pm
by Evgene Karachevtsev

Hello Blair,

Thank you for the update!