You can add a click event, run JavaScript to navigate to a page.
Catch up wih the Appery.io community on our forum. Here you'll find information on the lastest questions and issues Appery.io developers are discussing.
https://forum.appery.io/
You can add a click event, run JavaScript to navigate to a page.
Yes, button does not have url property. You can map url to invisible label (add it to grid cell with button) and add action on button click event. For example add this JS code on button click
window.open($(this).parents("td").eq(0).find("[dsid=hiddenLabelName]").text());
Hi,
This works great in the browser but when i try it on my android phone (using your app) it doesn't work. Any ideas why?
Hi,
Create JS asset:
precodefunction myNavigate(url) {
var cb;
if (window.plugins) {
cb = window.plugins.childBrowser;
}
if (cb != null) {
cb.showWebPage(url);
} else {
window.open(url);
};
}/code/pre
Replace window.open(...) with myNavigate(...)
what browser does this open? Is there a way to open it in their preferred browser?
Thanks
You would need to try. I suppose it depends on device settings and installed browsers.
Hi, sorry to start up an old subject but it seems that PDF's do not load or download when using the "childBrowser." Is there another way of doing this?
Thanks
grant
Hello! To download PDF file from Appery.io you have to open PDF link in standard browser with codewindow.open(url, "system")/code
You can rewrite myNavigate function this way:
codefunction myNavigate(url) {
if (/function myNavigate(url) {
if (/\.pdf$/i.test(url)) {
//If url ends with ".PDF" then open it in system browser
window.open(url, 'system');
} else {
var cb;
if (window.plugins) {
cb = window.plugins.childBrowser;
}
if (cb != null) {
cb.showWebPage(url);
} else {
window.open(url);
};
}
}
#46;pdf$/i.test(url)) {
//If url ends with ".PDF" then open it in system browser
window.open(url, '_system');
} else {
var cb;
if (window.plugins) {
cb = window.plugins.childBrowser;
}
if (cb != null) {
cb.showWebPage(url);
} else {
window.open(url);
};
}
}
/code