[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Newbie:  Coldfusion MX list boxes

Posted on 2010-09-02
6
Medium Priority
?
134 Views
Last Modified: 2014-10-24
On one of my Coldfusion forms, I have a dynamic list box that gets populated by using cfquery - my question is, how can I allow the user to add a selection to the list box if their choice is not listed?  Thx!
0
Comment
Question by:alphadcb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 
LVL 22

Accepted Solution

by:
plusone3055 earned 2000 total points
ID: 33591115
if their choice is not listed in the listbox and the list is results  from a query....
that choice needs to be added to the database and included in your query.

0
 
LVL 63

Expert Comment

by:Zvonko
ID: 33594074
The listbox with new options is an old general question.
The best choice is to have one Option in the list the allows the user to use a separate Input field for not listed value.
Name that Option: Other
On the server side check if Other selected then use OtherInput value.

0
 
LVL 63

Expert Comment

by:Zvonko
ID: 33594104
Or in other words: same reason that you cannot define Blinking text in style definitions you cannot have Editable select options.
Of course there are enough geeks out there to give you both: blinking editable options; but I assume that was not your question <|;-)
0
 

Expert Comment

by:traport
ID: 33596730
<!--- main form page --->
<!--- note: Certification is a text field --->
<cfquery name="cert" datasource="myAccessDSN">
SELECT Certification
FROM Certification
ORDER BY Certification
</cfquery>
<script>
function showAddPage() {
window.open('addNewCertification.cfm');
}
</script>
<cfform action="somePage.cfm" method="post">
<cfselect query="cert" name="Certification" value="Certification"
multiple="yes" size="5"/>
<a href="javascript:showAddPage();">Add New</a>
</cfform>

<!--- popup page: addNewCertification.cfm --->
<form action="addNewCertification.cfm" method="post">
Certification code: <input type="text" name="Certification">
<input type="submit">
</form>
<cfif IsDefined("form.Certification")>
<cfinsert datasource="#data_source#" tablename="Certification">
<script>
if (window.opener) {
window.opener.location.reload();
window.close();
}
</script>
</cfif>
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question