SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast robee's Avatar
    Join Date
    Aug 2003
    Location
    phils.
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy how to close the child window if the user did not click the exit button

    i have a parent window where i called my child window..after supplying the child window with appropriate values, let say, the user forgot to close that window..the parent window, should'nt be accessible, unless that child window is close. so the user should close the child window, so he/she can access the parent window...can anybody help me please???

  2. #2
    Sultan of Ping jofa's Avatar
    Join Date
    Mar 2002
    Location
    SvÝ■jˇ­
    Posts
    4,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When you open the window, put a reference to it in a variable; var w = window.open(...)
    And then, for every event in the parent window, first check that the variable w is null?

    Another method, if all your users are using IE:
    showModalDialog
    NB! Only IE4+

  3. #3
    Sultan of Ping jofa's Avatar
    Join Date
    Mar 2002
    Location
    SvÝ■jˇ­
    Posts
    4,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey ho - found this one:
    http://developer.netscape.com/viewso...man_modal.html

    Should work for other browsers than IE too

  4. #4
    SitePoint Enthusiast robee's Avatar
    Join Date
    Aug 2003
    Location
    phils.
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i tried it and it works! but i've encountered problems..when i try to edit my text box contents and push the save button on my modal dialog box..it opens another window...and worse, (i have a function to refresh the parent window from the child window), but it didnt execute... this modaldialog box is a bit confusing to me...


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
  •