I generally agree with Adam... the same could said about Flash, Java
or any client-side programming which is susceptible to platform
incompatibilities,hacking, etc. However this does not appear to be
business logic, rather application flow/user interface logic.
How you perform the application flow and redirection depends on what
happens when:
the form data from the popup is valid and the update goes forward (some forms
may have no visible input fields and are always valid/processed)
the form data in the popup is invalid and needs to be re-entered
The above determines whether you may need to:
close the popup, always
keep the popup open in case of error
In the former case, you can target the parent window in the popup
form and self close the popup on submission.
In the latter case, the popup remains the target (default) and
remains open (default). The cf logic returns the form for re entry
in case of an error.
If the form is accepted, the cf logic returns to the popup:
a redirect for the parent
a close for the popup
As Alex defined, below.
HTH
Dick
At 11:59 AM +0100 5/23/01, Adam Reynolds wrote:
>Avoid putting business logic inside javascript. You can't guarantee it
>will work.
>
>-----Original Message-----
>From: Alex [SMTP:[EMAIL PROTECTED]]
>Sent: 22 May 2001 17:55
>To: CF-Talk
>Subject: Re: [Re: [Redirect From Popup]]
>
>window.opener.location = "page.cfm?var=#var#";
>window.close()
>
>Alex <[EMAIL PROTECTED]> wrote:
>javascript on the update page.
>do a window.opener.refresh and window.close
>
>"Dave Hannum" <[EMAIL PROTECTED]> wrote:
>Hello,
>
>I have a form in a popup window. When I click the button, it does an
>update
>on the DB from that pop-up window. How can I then:
> First) Redirect to the parent window carrying query string info in
>the redirect URL and
> Second) Close the popup window on the redirect.
>
>
>Flow is as follows:
>
> PARENT ----> (Open) Pop-Up
> Run Update in Popup
> Pop-up (Close) ---> Reload PARENT w/query string
>in
>URL
>Thanks,
>Dave
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists