Professional Web Applications Themes

Close Browser and Change URL - HELP! - Macromedia Flash Actionscript

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!...

  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. #2

    Default Re: Close Browser and Change URL - HELP!

    <HEAD>
    <script language="JavaScript">
    function redirectParent()
    {
    var ns4 = doent.layers;
    var ns6 = doent.getElementById && !doent.all;
    var ie4 = doent.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

Similar Threads

  1. SESSION and browser close
    By grease in forum Coldfusion - Advanced Techniques
    Replies: 2
    Last Post: March 31st, 11:08 PM
  2. close all browser windows?
    By Chris in forum Dreamweaver AppDev
    Replies: 0
    Last Post: February 23rd, 09:36 PM
  3. close my project that is in a browser window (close this window)
    By Carlos Gonçalves in forum Macromedia Director Lingo
    Replies: 2
    Last Post: November 14th, 02:24 PM
  4. Browser Close Event
    By Navin in forum ASP
    Replies: 1
    Last Post: September 4th, 09:14 AM
  5. How to close the browser down ?
    By Deasun in forum ASP.NET General
    Replies: 5
    Last Post: July 23rd, 11:57 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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