0

I'm making a simple html page in which when I click an image, it opens a new popup that contains a minigame. When a user finishes the game and closes the popup, it redirects the parent window to a new URL.

Here is my code,

    <div class="single-featured img-full">
      <a onclick="openGameWindow();">
         <img src="https://www.htmlgames.com/uploaded/game/thumb500/bubblebilliards500300.webp" width="500px" height="300px" alt=""></a>
     </div>

And here is my Script,

<script>
        function openGameWindow() {  
            window.open('https://cdn.htmlgames.com/BubbleBilliards/', 
            'popUpWindow','height=400,width=400,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no, status=yes');
        }
</script>

anyone can give a solution on what to add to my script?

Shankaja Aroshana
  • 551
  • 1
  • 3
  • 17
  • 1
    Does this answer your question? [Javascript open new tab, and wait for it to close](https://stackoverflow.com/questions/17171589/javascript-open-new-tab-and-wait-for-it-to-close) – SimplyZ Mar 14 '23 at 09:55
  • "anyone can give solution what to add to my script ?" - anything not working with the current script? – Nico Haase Mar 14 '23 at 09:57
  • i tried this , but it doesnt work – Ali Sadikin Mar 14 '23 at 10:02
  • Please add all clarification to your quesiton by editing it. "It does not work" does not explain what that code **should** do – Nico Haase Mar 14 '23 at 10:16

0 Answers0