Community
cancel
Showing results for 
Search instead for 
Did you mean: 
xkevin
New Contributor I
31 Views

Open a link from my app

What is the code for opening a link from my app, best for updated version of intel xdk and cordova plugin. I am using a cross-website.

Currently this is my code, but ain't work'n. 

<script>
function join_browser(){
                var ref = window.open('https://www.mysite.com/join', '_blank', 'location=yes');
                 ref.addEventListener('loadstart', function(event) { alert('start: ' + event.url); });
                 ref.addEventListener('loadstop', function(event) { alert('stop: ' + event.url); });
                 ref.addEventListener('loaderror', function(event) { alert('error: ' + event.message); });
                 ref.addEventListener('exit', function(event) { alert(event.type); });
            }
</script>



<label class="text-style text-center">No account? <a href="#" onclick="join_browser(); return false;"> Register here. </a>
                                </label>

 

Tags (2)
0 Kudos
1 Reply
Elroy_A_Intel
Employee
31 Views

In order to display a web page in your application, I recommend using the https://www.npmjs.com/package/cordova-plugin-inappbrowser Cordova plugin. You can find examples their as well. This plugin is part of the Core Plugins in Intel XDK currently.

Reply