4 Replies Latest reply on Jan 28, 2009 7:35 PM by The ScareCrow

    A POPup Question

    newchickinCF
      I am trying to make a login system where i want to click a link and a popup window opens.

      i add the login details and if login is incorrect, it shows that login is incorrect. till this point it works fine.

      I want that when there is a successful login the popup should close automatically and the page get refreshed.

      I am trying it but it is not work, can anyone guide me..

      also i am generating the dreamweaver code for login.

      Regards
        • 1. Re: A POPup Question
          Dan Bracuk Level 5
          I forget the exact details, but, it's something like this:

          window.opener.reload();
          self.close();

          This is javascript of course.
          • 2. Re: A POPup Question
            coffeedrinker56
            There is also a "window.close" javascript method that can be conditionally executed from within the pop-up window.

            Be aware, however, that many current browsers inform the user that the window is trying to close itself. Is their required response to a "Do you want to continue?" message really what you want to happen?

            Usually people opt for a button to execute the window.close mechanism - which avoids the message.
            • 3. Re: A POPup Question
              Dan Bracuk Level 5
              quote:

              Originally posted by: coffeedrinker56
              There is also a "window.close" javascript method that can be conditionally executed from within the pop-up window.

              Be aware, however, that many current browsers inform the user that the window is trying to close itself. Is their required response to a "Do you want to continue?" message really what you want to happen?

              Usually people opt for a button to execute the window.close mechanism - which avoids the message.

              window.close() and self.close() are effectively equivalent.


              The confirm window alluded to only comes into play when you are trying to close a window with javascript that was not opened with javascript.
              • 4. Re: A POPup Question
                The ScareCrow Level 1
                If your using CF8
                There is a neat example in the online docs

                Using the cfajaxproxy SetForm function

                Look in the page for "Using the cfajaxproxy SetForm function"

                Ken