Question

How can a link be opened in a native phone browser when clicked in hybrid apps ? I built hybrid apps with Sencha Touch.

Like <a href="www.example.com"> view me in a browser </a>

Was it helpful?

Solution

Is there a way to invoke another browser?

Yes, there is. You can do this using window.open() function. But, you may read following description as why not to use it.

Please, don't force opening a link in a new window.

Reasons against it:

  • It infringes the rule of the least astonishment.
  • The back-button don't work and the user not possibly knows why.
  • What happen in tabbed browsers? New tab or new window? And whichever happens, is it what you wants, if you mix tabs and windows?

The reason I always hear in favor of opening a new window is that the user will not leave the site. But be sure, I will never come back to a site that annoys me. And if the site takes away control from me, that is a big annoyance.

A way may be, that you give two links, one is normal, the other opens it in a new window. Add the second with a little symbol after the normal link. This way users of your site stay in control of which link they want to click on.

EDIT:

OP's question is to open a new browser and not a new window of the browser. So I am keeping this answer as it explains why we shouldn,t forcing to create new windows.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top