Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    May 2004
    Location
    Norway
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Opener waiting for child ?!

    Hello.

    I want to accomplish the following.
    I have a window/form. On this form I have a checkbox. If the checkbox is checked, and the submit button is clicked, another windows should be opened (no problems so far). The problem starts now. When this new window is submitted or closed, THEN the first windows should do the real submit, automatically. Meaning, it should not be submitted until the new window has been closed (submitted or just closed). Anyone have a idea?

    Rune

  • #2
    New Coder
    Join Date
    Mar 2005
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If i remember correctly IE offers an "onClose" event, but this is only IE and/or browsers nowadays are starting offer the possibility to disable this function. So this is probably not the good way.

    Another option is to make a timer that checks whether the window exists on a regular basis. For example, declare a global new_window variable, in your head section, or outside your functions (if you use an external js file). Then, in the onsubmit part of your form do something like "new_window=window.open(optionshere); return false;"

    Then you could make a timer, using isset() on one of the windows properties to check if the windows still exists, and submit the form if it doesn't.


  •  

    Posting Permissions

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