Open and then close a browser tab for an external address

I am incorporating Canary Axiom charts into Perspective views. Running via HTTPS is the only option, and we are using SSO for Axiom. I'm launching a new browser tab for Axiom via a Page Startup script in Session Events. This launches the Axiom tab and establishes the SSO authentication and then allows the Axiom charts to be viewed in the Perspective window. The only irritation is that the focus goes to the new Axiom tab. Via WebDev I have tried using JavaScript via html, but the best result still pops up another tab window. Anyone able to do something like this successfully via Perspective?

Here is the html:

<!DOCTYPE html>
<html>
<head>
    <title>Open and Close Tab Example</title>
</head>
<body>
    <h1>Open and Close Tab Example</h1>

    <script>
        // JavaScript code to open and close a new tab
        var newTab = window.open("https://<AXIOM address>", "_blank");

        // Wait for 5 seconds
        setTimeout(function() {
            // Close the new tab
            newTab.close();
        }, 5000);
    </script>
</body>
</html>

I figured out how to do this... The key was to use the webdev script to handle everything including launching the perspective home page when ready, and not using the Session Events Page Startup scripting.

<!DOCTYPE html>
<html>
<head>
    <title>Launch External Page and Open Perspective</title>
</head>
<body>
    <h1>Launch External Page and Open Perspective</h1>

    <script>
        // JavaScript code to launch the external page and open the perspective
        var externalPage = window.open("https://example.com", "_blank");

        // Wait for the external page to load
        setTimeout(function() {
            // Close the external page
            externalPage.close();

            // Redirect the user to the Ignition Perspective URL
            window.location.href = "http://your-ignition-perspective-url.com";
        }, 5000);
    </script>
</body>
</html>