0

I'm building a sencha touch app for ios. In order to open URL in external browser , I have included phonegap and cordova. I tried using both this functions to open URL.but didn't work.please help me.

 Ext.device.Device.openURL('http://www.bing.com');

 navigator.app.openUrl('http://www.bing.com',{ openExternal:true });
Harikrishnan
  • 9,688
  • 11
  • 84
  • 127

2 Answers2

2

Simple window.open('http://www.google.com') should work and if you want to open the web page in a browser instance within your app, you should consider using InAppBrowser Plugin which uses same window.open and degrade gracefully to default

ThinkFloyd
  • 4,981
  • 6
  • 36
  • 56
1

For me, window.open() didn't work in all cases. Another solution is assign the URL to window.location. Example for opening an external Url using a button:

Ext.Button.create({
            xtype: 'button',
            text: 'open url',       
            handler: function () {  
        window.location = "http://www.google.com";
            });
Martin
  • 326
  • 4
  • 9