I'm having problems visualizing the solution that I need here. I have a select menu on the site that I'm working on and the client would like to be able to select an option called "Create New Origin", which would then have a JS window pop up with a blank field for the user to type in that new origin.
Upon submitting this form the database would be updated and the select menu would now feature this item without an entire refresh of the page.
The database side of things is all set up and ready to go, as is 99% of the Coldfusion.
Here's a snippet of the form field in question:
<p class="_30NP" align="right"> <label>Origin </label> </p> <p class="_20NP"> <cfselect name="Origin" id="Origin" query="Origin" display="description" value="code" required="yes"> <option value="new">New Origin</option> </cfselect> </p> Here's the CFQUERY:
<CFQUERY DBTYPE="Query" NAME="Origin"> SELECT Code, [Description] FROM ZCODES WHERE CODE = 0 UNION ALL SELECT Code, [Description] FROM ZCODES WHERE FieldName = 'Origin' ORDER BY 1 </CFQUERY> This is a very simple question with probably a very simple answer, I just have little exposure to AJAX.
How do I submit a form (pop up window) and refresh the select list without completely refreshing the page?
cfselectand binding?