Forum Discussion
Exit course/close browser window not working correctly
When you open the new tab, do you use a straight HTML link:
<a href="https://www.google.com/" target="_blank">Go to Google</a>
or JavaScript:
<button onclick="Open()">Google</button>
<script>
function Open() { window.open("https://www.google.com", "_blank");
}
</script>
The reason I ask is because you can only close a tab (window) using JavaScript if it was OPENED using JavaScript.
Hi, would you mind telling me where to input this code on Squarespace? How do I link it to an existing button so that it opens up to a new tab? I also am linking to AWS. I have already created a javascript trigger to close the browser. Thanks in advance!
- JoeFrancis3 years agoCommunity Member
You would put the code on the page which you use to launch the published Storyline course(s); pointed to the story.html file.
Related Content
- 2 years ago