Software Archive
Read-only legacy content
17061 Discussions

WP8 build: window.open() works first time only in Windows Phone 8

Alessandro_G_
Beginner
585 Views

I am developing an HTML5 app with Intel SDK, compiling for Windows Phone 8 platform, and deploying and testing on Nokia Lumia 530.

Inside my app, an internal button must open an URL in system browser:

HTML: <button class = "ui-btn my-button" id = "testExternalLink1"> Button 1 </ button>

JS: $ ("# testExternalLink1"). On ('click', function () {window.open ('http://www.google.it', '_system');});

The workflow works perfectly the first time (when I click the button, system opens the browser with correct URL), but if I go back from browser (with system back button) and I press the same button again I have no feedback. The browser is called only the first time.

In summary: window.open() works first time only in Windows Phone 8.

Someone can give me help?

0 Kudos
3 Replies
PaulF_IntelCorp
Employee
585 Views

Try using the inAppBrowser function, instead. It is part of the Win Phone 8 build system (note, Cordova 2.9 is what's used in that build). Here's a link to the doc page for it: http://cordova.apache.org/docs/en/2.9.0/cordova_inappbrowser_inappbrowser.md.html#InAppBrowser

0 Kudos
Alessandro_G_
Beginner
585 Views

Thanks Paul,

but how can I use the plugin InAppBrowser?
I am developing and building my app in Intel XDK for Windows Phone 8: the plugins, inside Intel XDK, are usable only for CORDOVA 3.X HYBRID MOBILE APP PLATFORM (Android, iOS, Windows 8) and not for LEGACY HYBRID MOBILE APP PLATFORM (Windows Phone 8).

Do you have other suggestions?

0 Kudos
PaulF_IntelCorp
Employee
585 Views

The legacy system includes the core Cordova 2.9 APIs. The doc link I provided to you is appropriate for that situation.

0 Kudos
Reply