Hello, I have a button when I click on I want to download a pdf file and at the same time open a second window.
I find this script here https://www.youtube.com/watch?v=WfI7bJ8hac8.
How can you add it to Nicepage?
<script type="text/javascript">
<input id="myidname" value="mybutton" type="button" />
<script type="text/javascript">
this.mybutton = document.getElementById("myidname");
this.mybutton.addEventListener("click", hello);
Function hello (){
window.open("/myfile.pdf");
window.location.replace("https://www.adobe.com");
}
</script>
Thanks :-)
Hello, I have a button when I click on I want to download a pdf file and at the same time open a second window. I find this script here https://www.youtube.com/watch?v=WfI7bJ8hac8. How can you add it to Nicepage? <script type="text/javascript"> <input id="myidname" value="mybutton" type="button" /> <script type="text/javascript"> this.mybutton = document.getElementById("myidname"); this.mybutton.addEventListener("click", hello); Function hello (){ window.open("/myfile.pdf"); window.location.replace("https://www.adobe.com"); } </script> Thanks :-)Last edited 05 June 2020 by Auguste