Ask a Question related to Macromedia ColdFusion, Design and Development.
-
JrCFDeveloper #1
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
-
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... -
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... -
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... -
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... -
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... -
Kronin555 #2
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
-
ayhanyildiz #3
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



Reply With Quote

