Professional Web Applications Themes

Closing Popup window - Dreamweaver AppDev

I have 3 pages. The first has a button which opens a popup window. The secons (popupwindow) has a butoon which leeds to the third page. When I click the button on the second page (popup) I want to close the second page and open the third maximized (not popup) regards ReidarT...

  1. #1

    Default Closing Popup window

    I have 3 pages.
    The first has a button which opens a popup window.
    The secons (popupwindow) has a butoon which leeds to the third page.
    When I click the button on the second page (popup) I want to close the
    second page and open the third maximized (not popup)

    regards
    ReidarT


    ReidarT Guest

  2. #2

    Default Re: Closing Popup window

    On Wed, 9 Mar 2005 08:45:05 +0100, ReidarT <reidareivon.no> wrote:
    > I have 3 pages.
    > The first has a button which opens a popup window.
    > The secons (popupwindow) has a butoon which leeds to the third page.
    > When I click the button on the second page (popup) I want to close the
    > second page and open the third maximized (not popup)
    >
    > regards
    > ReidarT
    >
    >
    Javascript would be the language of choice however the usual warnings are
    that users might not have this if they disable javascript from their
    browsers and some browsers won't react to features like resize.

    Once of the disclaimer has been said we can move on to the script:

    <html>
    <head>
    <title>JavaScript Window Close Example </title>
    </head>
    <SCRIPT language="JavaScript1.2">
    function popuponclick()
    {
    my_window = window.open("",
    "mywindow","status=1,width=350,height=150");
    my_window.doent.write('<H1>The Popup Window</H1>');
    }

    function closepopup()
    {
    if(false == my_window.closed)
    {
    my_window.close ();
    }
    else
    {
    alert('Window already closed!');
    }
    }
    </SCRIPT>
    <body>
    <P>
    <A href="javascript: popuponclick()">Open Popup Window</A>
    </P>
    <P>
    <A href="javascript: closepopup()">Close the Popup Window</A>
    </P>
    </body>
    </html>

    ------ For resize: window.resizeBy(100,-100);

    --
    Alexandro Colorado
    ------------------------------
    Support Engineer
    InterAKT Online
    [url]http://www.interaktonline.com[/url]
    Tel: 40(21) 312.5312
    Alexandro Colorado Guest

Similar Threads

  1. Question After I closing of a popup window, how do I move it to the Top of the page
    By Chandan Dash in forum Macromedia Dynamic HTML
    Replies: 0
    Last Post: November 3rd, 07:22 AM
  2. closing popup window moves mouse to top of page
    By Jamie9470 in forum Macromedia Dynamic HTML
    Replies: 4
    Last Post: April 25th, 01:02 AM
  3. Setting a popup window's base target to caller window?
    By saf_123 in forum Macromedia Dynamic HTML
    Replies: 1
    Last Post: July 6th, 11:01 AM
  4. Problem saving data and closing popup windows
    By DeliK in forum Coldfusion - Advanced Techniques
    Replies: 2
    Last Post: May 8th, 11:30 PM
  5. can a popup window return data to parent window?
    By nadia in forum PHP Development
    Replies: 3
    Last Post: September 25th, 08:05 PM

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