Results 1 to 6 of 6

Thread: Wait for popup to close before continuing loading

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2004
    Posts
    172

    Wait for popup to close before continuing loading

    Hi, how do I do to make a page wait for a popup to close before continuing the loading of the main page?

    Thanks

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Wait for popup to close before continuing loading

    What are you trying to accomplish that requires the page to wait for a popup to close?

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2004
    Posts
    172

    Re: Wait for popup to close before continuing loading

    What I'm trying to do is the following. I have a web page so the user can enter some informations. When he click on " Apply" I must check if a specific field is empty, if yes I must open a popup that contain a list and a ok button that return the choice on the list. So I need that the main page wait for the popup to close before continuing the loading.

  4. #4
    Frenzied Member
    Join Date
    Nov 2001
    Location
    Mass USA
    Posts
    1,674

    Re: Wait for popup to close before continuing loading

    You should probably use RequiredFieldValidator control if you have data that is required before continuing.

  5. #5
    Frenzied Member
    Join Date
    Jan 2006
    Posts
    1,875

    Re: Wait for popup to close before continuing loading

    What if pop-up it self Load the Main page and close it self after passing value?

    'code on pop-up page when "Apply" is clicked
    Code:
            Dim strScript As String
            strScript = "<script language=javascript> "
            strScript &= " window.opener.Form1.txtTest.value = 'Info';"
            strScript &= " window.opener.document.forms(0).submit();"
             strScript &= " window.close();"
            strScript &= " </script>"
            Response.Write(strScript)
    __________________
    Rate the posts that helped you

  6. #6
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Wait for popup to close before continuing loading

    You can use a customvalidator or just a custom javascript function which you run in the onsubmit for the <form>. Have it return false if the field is empty. Then, within the same method, call the window.open(). This way, the form won't submit, but it will open the popup window you wanted. The user will need to select something and then click on the submit button again.

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