dcsimg
A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Help! Souds simple but how do I close a browser window from the window itself?

  1. #1
    Junior Member
    Join Date
    May 2001
    Posts
    23
    Hi,

    This may sound easy but I can't find anything to help me! I have created a button in my flashdoc that makes a child browser window pop up from the parent. Not too hard. But now what I want to do is close the window again, but NOT from the original window, from the popped up window itself.

    All the tutes I have found are for closing the window from a button on the parent window, not the child window itself. Has anybody done this before? I don't know if it's possible!!

    Lara.

  2. #2
    Senior Member
    Join Date
    Nov 2000
    Posts
    237
    javascript:window.self.close();

  3. #3
    Junior Member
    Join Date
    May 2001
    Posts
    23

    Sorry, didn't work!

    Originally posted by kamblemilind
    javascript:window.self.close();
    Hi,

    sorry, that didn't work. I tried placing the code directly in GetURL, and also tried defining a function in the html code of the popupwindow itself called closewindow, and then referred to the FUNCTION in GetURL.

    Neither of these worked. Any suggestions?

  4. #4
    Senior Member
    Join Date
    Sep 2000
    Posts
    910
    Hi..this should work...

    on (release) {
    getURL ("javascript:window.close();void(0);");
    }

    -pigghost-



  5. #5
    Junior Member
    Join Date
    May 2001
    Posts
    23

    Aaah, still no luck!

    Originally posted by pigghost
    Hi..this should work...

    on (release) {
    getURL ("javascript:window.close();void(0);");
    }

    -pigghost-


    Not working for me!! Anything I might have overlooked?


  6. #6
    Senior Member
    Join Date
    Nov 2000
    Posts
    237
    i dont know why it is not working do one thing mail me ur fla @ kamblemilind@rediffmail.com

    or another way is
    create simple htm file close.htm

    <HTML>
    <HEAD><TITLE>Close</TITLE></HEAD>
    <BODY ONLOAD="window.self.close()">
    </BODY>
    </HTML>

    and

    on (release) {
    getURL ("close.htm");
    }

    it is also simple

    thanx

    milind
    [Edited by kamblemilind on 06-14-2001 at 01:59 AM]

  7. #7
    Senior Member
    Join Date
    May 2001
    Posts
    180
    In IE there is this little button in the upper right...umm...its got an 'X' in the box...or wait, in Netscape for Mac its in the upper left, no 'X' in that one, but either will close the window...(I'm sorry, something came over me when I read this thread!)

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center