Page 1 of 1

"Navigate to link" - Takes you to browser with no navigation controls!

Posted: Tue Oct 08, 2013 4:45 pm
by 3dbounce

Hi, I'm currently in the process of updating one of my apps due to a bug. What has happened is that when a user clicks a button it takes you to a webpage but it does not open in their native browser and in fact opens in a random browser with no navigation controls... If your using an iPhone that means its impossible to navigate back to the app without closing the app completely.

All i have done is selected the button and added a "Click" event and using the action "Navigate to link" followed by the url to the page.

It seems to me that your current "Navigate to link" action is in fact bugged and takes you to a browser with no navigation controls.

Any idea what i could do to sort this?


"Navigate to link" - Takes you to browser with no navigation controls!

Posted: Tue Oct 08, 2013 5:39 pm
by maxkatz

I'm assuming you are running a hybrid app? It's not a bug, it opens the page in InAppBrowser: http://docs.phonegap.com/en/2.9.0/cor...


"Navigate to link" - Takes you to browser with no navigation controls!

Posted: Tue Oct 08, 2013 5:42 pm
by 3dbounce

But there are no control's for the user, which is terrible functionality. Is there a way to bring up controls? This basically cripples the app if your using an iPhone/iPad


"Navigate to link" - Takes you to browser with no navigation controls!

Posted: Tue Oct 08, 2013 5:43 pm
by 3dbounce

or even make it open in their native browser?


"Navigate to link" - Takes you to browser with no navigation controls!

Posted: Tue Oct 08, 2013 5:49 pm
by maxkatz

Use:

code
window.open('http://apache.org', '_system', 'location=yes');
/code

http://cordova.apache.org/docs/en/2.9...


"Navigate to link" - Takes you to browser with no navigation controls!

Posted: Wed Oct 09, 2013 1:54 pm
by 3dbounce

Hi thanks for your help so far but this does not seem to work.

The window will no longer open. I have tested this in both xcode and the appery android testing app.

Here is the code im using on a click event:

window.open('http://www.abaoms.org.uk/', '_system', 'location=yes');


"Navigate to link" - Takes you to browser with no navigation controls!

Posted: Wed Oct 09, 2013 2:18 pm
by 3dbounce

also to add another headache, pdf's do not open or download when using the "Navigate to link" action.

I have also tried this:

myNavigate('http://www.baos.org.uk/resources/news...');

with a java script containing this:

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

This brings up the navigation controls but pdf's still dont open :(


"Navigate to link" - Takes you to browser with no navigation controls!

Posted: Wed Oct 09, 2013 7:45 pm
by Kateryna Grynko

Hi,

You should add to call window.open parameter 'location=yes'.


"Navigate to link" - Takes you to browser with no navigation controls!

Posted: Thu Oct 10, 2013 12:02 pm
by 3dbounce

Hi,

This does not work either. It simply doesn't want to open a PDF. The window.open command doesn't work either unless you use the code above and "myNavigate."

I might have to use google doc's PDF viewer to get around this problem for now.


"Navigate to link" - Takes you to browser with no navigation controls!

Posted: Thu Oct 10, 2013 2:27 pm
by Kateryna Grynko

Hi,

The following code:
codewindow.open('http://apache.org', '_system', 'location=yes');/codeshould open main device browser.

On what event of what component do you add the code? It won't work on link click.

As for the PDF - please take a look at here: https://getsatisfaction.com/apperyio/...