Well you just write the form as usual then use JS to popup the window.
Google for window.open

There are a couple ways to "refresh" the parent...

1) you could call a JS function that uses an http request (AJAX) to
repopulate the select
2) You could just pass the new record back to the parent via JS and add a
new option via JS to the select using that passed data.
3) Like I said before, You could just submit the form back to itself to
retain the form scope and let CF and your original CFquery repopulate the
select.

Good luck

..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com

-----Original Message-----
From: Steve Sequenzia [mailto:[EMAIL PROTECTED] 
Sent: Sunday, July 22, 2007 8:05 PM
To: CF-Talk
Subject: Re: General UI Question

In a related question to this, can anyone please help me get started on the
best way to do a popup page that inserts the new record and then updates the
<cfselect> on the original page without having to reload the original page.

I know how to do the popup and the insert without any issues. I can also
send back an ID to the original page of the new record. What I am not sure
about is how to update the <cfselect> value to reflect the newly inserted
record without reloading the original page.
 
I am assuming that httprequest will have to be used someway but I am not
really sure where to start.
Any guidance on this would be great.


> I have a general question about how people are handling new records to 
> select boxes. I mean if you have a form with a select box that 
> displays values from a database but when the user is filling out the 
> form they need to add a new record to that list.
> 
> --Example--
> Description: <textbox>
> Data: <datapicker>
> Company: <cfselect>
> Details: <textbox>
> 
> On this example the user wants to add a new company that is not in the 
> list. They need to be able add a new company. They will need to be 
> able to add the name and all data (like address and phone) that goes 
> with company.
> 
> I don't have any issues handling the insert part of this. I am just 
> not sure the best way to handle the interface.
> 
> I have tried lots different ways to do this but I have never really 
> figured out a good way to handle it.
> 
> Anyone out there have any pointers for me about this.
> 
> Thanks in advance.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284338
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