Close Browser and Change URL - HELP!

Ask a Question related to Macromedia Flash Actionscript, Design and Development.

  1. #1

    Default Close Browser and Change URL - HELP!

    Hi all,

    Here's my situation:

    I have a URL with a link that:

    1. Opens a new browser window, in which reside an SWF movie.
    2. At the end of the movie I have a button that closes the bowser window

    My question:
    Once the window is closed, is there a way (via actionscript or any other way for that matter) to change the URL in the original parent window?

    Any help is appreciated. Many Thanks!


    design_guy webforumsuser@macromedia.com Guest

  2. Similar Questions and Discussions

    1. SESSION and browser close
      I have written a shopping cart application which kills all SESSION vars when the browser is closed. However, despite it working correctly on my...
    2. close all browser windows?
      Does anyone know of any javascript or other method to close all open browser windows? I have an issue where a user logs in to our intranet through...
    3. close my project that is in a browser window (close this window)
      How can I do this with a button? What do I have to put into button?
    4. Browser Close Event
      which event is fired when a browser is closed. i want to call asp page which deleet some files on the server. i tired using onunload event but it...
    5. How to close the browser down ?
      Good evening all. I know how to close the browser down when there is no frames involved. I have a frameset aspx page. It has 3 frames, left, main...
  3. #2

    Default Re: Close Browser and Change URL - HELP!

    <HEAD>
    <script language="JavaScript">
    function redirectParent()
    {
    var ns4 = document.layers;
    var ns6 = document.getElementById && !document.all;
    var ie4 = document.all;

    if(ns4) URLStr = "target url";
    else if(ns6) URLStr = "target url";
    else if(ie4) URLStr = "target url";
    else URLStr = "target url";

    parent.location = URLStr;
    }
    </script>
    </HEAD>

    <BODY onUnload="redirectParent()">
    <input type="button" value="Close" onClick="self.close()">
    </BODY>

    I have no time to test this script.

    Nitin


    nITiNkIlLeRmEeRuT webforumsuser@macromedia.com Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139