Andrew,
I had a similar situation. The way I did it is a) set up the 
parent form to pull the field values from session vars (I use a 
home-grown formBean); b) when the popup window is called, first 
use Ajax to pass the parent's field values to a routine on the 
server  which stores then into session variables; then c) when 
popup window is submitted, update the session vars, reload the 
parent window (which of course uses the updated session vars), 
and close the popup.

Works fine, except for an irritating "Reload" box IE insists on popping up.

Dave Jones
NetEffect


At 01:49 PM 10/12/2006, you wrote:
>Got a form with a list of rows coming from a database.  User enteres new
>data, then realizes he needs to add a row to this form. User click sa
>hyperlink to do just that - and a popup window opens for him to add a
>row. User closes the  popup window after successful addition, and form
>must refresh to add the row, but a refresh would erase the unsaved data.
>What is an elegant way to store this data and repopulate the refreshed
>window with it? I could prompt the user to save the form before leaving
>it if the form is dirty, and I do, but the form has many edits and would
>never successfully submit to the dbif the user had to add a row and a
>value to that row.  So I need to store it another way
>
>  I am guessing some javascript would help. Somehow I may be able to loop
>through the form's fields and capture each value and pass it along to
>the popup window, then back down to the main window after the refresh.
>Does that sound like a good start? Something like:
>
>for(var i=0; i < window.document.form1.elements.length; i++{
>     putInArray(window.document.form1.elements[i].value);
>}
>
>I know that syntax is no where close to what it should be, but am I on
>the right track? Thanks.
>
>Sincerely,
>
>
>
>Andrew
>
>
>
>
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:256706
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to