How to close a window?

[ad_1]

I have a button on my landing page that allows users to bring up Okta so that they can be authenticated. Once they are authenticated I allow them to use my application. This is the html code behind the button:

<script>

document.getElementById(“clickable”).onclick = function() {myFunction()};

&#x200B;

function myFunction() {

location.href = “[https://staging.dashboard.researchstudyonline.com/saml/saml/sso/index.php?sso]”;

}

</script>

Not too complex! My problem is that when they click on the button, the wordpress landing page (the calling page) doesn’t close. Is there anything I can add to the above script to get the landing page to close?

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer