macromedia.coldfusion.cfml_general_discussion
[Top] [All Lists]

Re: Passing back data from a popup window

Subject: Re: Passing back data from a popup window
From: "Jonny`"
Date: Wed, 8 Aug 2007 16:36:27 +0000 UTC
Newsgroups: macromedia.coldfusion.cfml_general_discussion
There are various ways to do it, the most seamless way for the user is to use 
JavaScript.

 If you are developing in-house for an application you know will use IE you 
could use a modal dialog (will only work in IE). You can check out the 
properties at MSDN but it will esentially allow you to specify a return value 
which you can pass back to some javascript on the main page which would then 
update the form with that information. A quick solution for IE and it does 
allow you to keep focus in that pop-up etc.

 Downside is it won't work in firefox etc. A better solution might be to use 
the parent-child relationship you have within the DOM when you have opened a 
pop-up. You should be able to manipulate the parent window (the one which 
called the pop-up) by something like self.parent... it's been a while since 
I've done it so I'm rusty on the exact JS but you ought to be able to have some 
javascript to either populate the appropriate field in the parent's DOM or to 
pass a value back to the parent and go from there.

 I would post an example but I have to catch a train in 5 mins so need to leave 
the office!


<Prev in Thread] Current Thread [Next in Thread>