Editable combo boxes in CF

Ask a Question related to Macromedia ColdFusion, Design and Development.

  1. #1

    Default Editable combo boxes in CF

    Hi,
    I want to add a combo box that the user can type into. As the user types, the
    selection scrolls down the list to match the characters that the user is typing
    (this already happens with a regular CFSelect), But I also want to give them
    the ability to add a new item if it doesnot exist. Has anyone does this before?
    Any help would be appreciated!
    Thanks!



    JrCFDeveloper Guest

  2. Similar Questions and Discussions

    1. Need help with xml and combo boxes
      Basically what im doing is a ui for a electronic book. The book is broken into 3 parts and each part has its own set of chapters. My xml schema...
    2. Combo boxes
      I have a combo box on one form with has a row source of 2 fields, an item number and item name. I item number width is 0 so it only displays the...
    3. Combo Boxes do not work? WHY! :-)
      Alright... I have an issue with some combo boxes absolutely refusing to populate in my movie. You can visit...
    4. Synchronizing two combo boxes
      I wish to synchronizing two combo boxes. I have try the following solution: I have made 2 Combo boxes. The first combo boxes name is cbofirst...
    5. Two combo boxes on a form
      I would do a couple of things differently. First, rename your controls. is a lot more recognizable than , especially if you want to use it as...
  3. #2

    Default Re: Editable combo boxes in CF

    What you're asking for has to be accomplished via javascript, dhtml or plain
    html. All the cfselect code does is generate an HTML select (with possibly some
    backing javascript for validation).

    Here's a DHTML version that might fit what you're looking for:
    [url]http://webfx.eae.net/dhtml/combobox/combobox.htm[/url]

    If you search on Google for "Editable select box", you get a bunch of hits.

    Kronin555 Guest

  4. #3

    Default Re: Editable combo boxes in CF

    I think you can do this without javascript.
    to add new item:
    create text field next to combo box. (let's name the text field with "newitem"
    for this sample)now, the item is not in combo box and we are writing into text
    box.
    you can insert new item into database and next time you will see in combo box.

    let's insert:
    <cfif len(form.newitem)>
    <cfquery datasource="yourdatasource">
    INSERT INTO comboboxtable(field)
    VALUES ('#form.newitem#')
    </cfquery>
    </cfif>

    now

    let's say you are you are updating your data

    <cfquery datasource="yourdatasource">
    UPDATE table
    SET
    <cfif len(form.newitem)>
    field= '#form.newitem#',
    <cfelse>
    field= '#form.oldcomboboxselection#',
    </cfif>


    I hope this will help.

    ayhanyildiz Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139