2
I have an application that runs on mobile compiled in PG build Cli 5.2.0 In this app I have some external links to open. I implemented inappbrowser to be able to close the open browser and return to the app. however there are several different links. Is there any way I can do a function without the specific link and only specify on the button when I call the function? so I don’t have to do a function for each different link. Ex: I am using.
<head>
<!-- o script esta rodando no cabeçalho -->
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script type="text/javascript" charset="utf-8">
function face() {
var ref = window.open('http://facebook.com', '_blank', 'location=yes');
}
</script>
<body>
the button is in the body of the app and needs to have several buttons of this with different links...
<li><button onclick="face()">Pagina do face</button></li>
You can put the link here
onclick="face(link...)"
and then do inside the function... ction face(link) {window.open(link, ...
Is that what you want? Notice that yours</head>
is missing.– Sergio
Vlws brother I believe this will solve my problem, after the link came out with ... there in windows open, what goes after?
– Valmir Sartori
Can Sergio help where I’m going wrong?... <head> <script type="text/javascript" charset="utf-8" src="Cordova.js"></script> <script type="text/javascript" charset="utf-8"> Function face(link) { var ref = window.open('link', '_Blank', 'Location=yes'); } </script> </head> In the body... <button onclick="face('https://facebook.com')">You have offered</button>
– Valmir Sartori
Thanks brother worked out I found the error... was using 'link' within windows.open... and no need to ' '
– Valmir Sartori