Software Archive
Read-only legacy content
17061 Discussions

jquery button to link to an external window

Waldo_Y_
Beginner
391 Views

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?

 

0 Kudos
2 Replies
Hamilton_Tenório_da_
Valued Contributor I
391 Views

If I understood you, I think you need something like this:

In .js file:

function funAbreURL(cURL) {
    intel.xdk.device.launchExternal(cURL);
}

$(document).on("click", "#spaLinkHTS", function () {
    funAbreURL("http://www.hts-net.com.br/");
});

In HTML file:

<span id="spaLinkHTS" class="links">
                                        <img src="imagens/logo_hts.gif" style="text-align: center; float: right;" alt="HTS Informática" data-appbuilder-object="image" class="" title="">
                                    </span>

 

 

 

0 Kudos
Reply