- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I'm very new to scripting and coding so I might not get through to you guys but I hope this attempt goes straight to the point so I don't bore you.
So I've been searching online for an example javascript like the window.open and noticed this. https://software.intel.com/en-us/node/493021. How do you make it work to where you click on a button on a IOS app to natively open Safari to the preferred website. Can anyone show me a link or post an example so that I can try it?
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey all I figured it out I'll just leave the coding for those who wish to find it for their own as well.
<script id="xdkJSonDeviceReady_"> function onDeviceReady() { // ignored by "Standard HTML5 web app" if( navigator.splashscreen && navigator.splashscreen.hide ) { // Cordova hide splashscreen detected, use it navigator.splashscreen.hide() ; } } document.addEventListener("deviceready", onDeviceReady, false) ; // ignored by "Standard HTML5 web app" $(document).ready(function() { $("#facebook").bind("click", function() { intel.xdk.device.showRemoteSiteExt("http://www.facebook.com/merailrabeluu"); }); }); </script> <script id="xdkJSonDeviceReady_"> function onDeviceReady() { // ignored by "Standard HTML5 web app" if( navigator.splashscreen && navigator.splashscreen.hide ) { // Cordova hide splashscreen detected, use it navigator.splashscreen.hide() ; } } document.addEventListener("deviceready", onDeviceReady, false) ; // ignored by "Standard HTML5 web app" $(document).ready(function() { $("#twitter").bind("click", function() { intel.xdk.device.showRemoteSiteExt("http://www.twitter.com/merailrabeluu"); }); }); </script>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Much easier to read....and works just as well:
<script id="xdkJSonDeviceReady_"> function onDeviceReady() { // ignored by "Standard HTML5 web app" if( navigator.splashscreen && navigator.splashscreen.hide ) { // Cordova hide splashscreen detected, use it navigator.splashscreen.hide() ; } } document.addEventListener("deviceready", onDeviceReady, false) ; // ignored by "Standard HTML5 web app" $(document).ready(function() { $("#facebook").bind("click", function() { intel.xdk.device.showRemoteSiteExt("http://www.facebook.com/merailrabeluu"); }); $("#twitter").bind("click", function() { intel.xdk.device.showRemoteSiteExt("http://www.twitter.com/merailrabeluu"); }); }); </script>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Samuel G.,
I appreciate the code. Sorry I'm not really code savvy. It's really a self taught experience for me. I read the code and I see what you did there. Very interesting. Thanks for your help. I will update it to my file.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page