Editable dropdown box to be used in coldfusion application

Posted on 2007-10-12
Last Modified: 2013-11-19
I need to make an editable dropdown box in my coldfusion application. It's like you can either choose from the list below or type in your own text. I dont know if ther is one out of the box like list box and combo box.. or is there one?

If not then what is the simple and best way to make one? I'm sure coldfusion may not have anything to do with it and it will be HTML and JavaScript. That's OK too.

I thought I'd just ask before I break my head with something like this

If coldfusion can help.. that would be excellent. I think ASP.NET already has something like this. Your help would be appreciated.
Question by:aliasim99
    LVL 54

    Accepted Solution


    Do you have to have the new item in the dropdown list?  This would usually be done by having an "Other" option as the last in the list.  If that is selected then you have a input box for the item to be input.  This could even be hidden until Other is selected.  Let me know if you need help doing this on your page and provide the html for that part of the page.

    Let me know if you have any questions or need more information.

    LVL 18

    Expert Comment

    I created something like this a while ago for work.  It isn't super duper fancy, but it gets the job done.

    It breaks when you resize the page(never got around to fixing that.  I suppose a window.onresize call could do it) and the button is pretty crappy(in my version for work, I replaced it with a graphic button).

    Here is a basic example of it's usage:
    <script src="comboBox.js"></script>
    window.onload = function() {
    var myComboBox = new comboBox(100, document.getElementById('textbox'));
    myComboBox.addOption('Item 1');
    myComboBox.addOption('Item 2');
    myComboBox.addOption('Item 3');
    myComboBox.addOption('Item 4');
    <input type="text" id="textbox"/>

    Author Comment

    Morcalavin:You got the right Idea. That is what I need but I cant use this. I could if it was my own app. But on the same page I have other dropdowns and that button looks no where close to it. My app will be used internally by fortune 500  companies. I like the idea of using text box and connecting a combo box to it. But I need something similar to the link I provide. Something that does not take the look and feel away.

    b0lsc0tt:I see what you mean but the requirement is editable dropdown. Another field will not make my boss happy :)
    LVL 18

    Assisted Solution

    You can always style it to look like the rest of the page.  In my app, I changed the button to an image, and it worked perfectly.  You'd just have to tweak the code a bit.

    Author Comment

    I used the code from the site I listed. Thanks for your help.
    LVL 54

    Expert Comment

    Your welcome!  I'm glad I could help.  Thanks for the fun question, the grade, and the points.


    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    web page won't close 26 62
    Microsoft Edge 9 69
    Select distinct 25 43
    adding parameters to the url using jquery 2 17
    What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now