If you can depend on JS, I'd go with it.

You could have a link that pops up a window with the company name form (or
even makes a hidden div with the form in it visible). When it's submitted,
add it to the database and append the new option to the drop down (via JS)
with the new company info. Then close the company form or whatever... But
you never leave the primary form this way.
 
..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
 
 

-----Original Message-----
From: Pete Ruckelshaus [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 10, 2006 1:18 PM
To: CF-Talk
Subject: Retaining form data after navigating away?

I'm sure there is an elegant solution to this, I just don't know what it is.

I have a form. Text fields, dropdowns, that sort of thing.  One
dropdown field has "companies" with a listing of companies.  If a
company is not in the dropdown, the user needs to add that company to
the database, which is a form on a different page.  This requires that
the user navigates away from the form, but they might have already
entered some data in the original form.  I don't want to have them
retype the info.

The approach I am headed towards now is having the "add company" link
actually submit the form to an interstitial page that dumps the form
data into a session.redirect structure that I created, then redirects
the user to the "add company" form.  The problem I am having is that
the data in the session.redirect structure is being "lost" when the
interstitial page redirects to the "add company" form, so all the
original form data (and the URL that should be navigated back to) is
being lost.

Is there a more elegant solution to this problem?

Thanks,

Pete



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229081
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to