Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Data Integration / October 2005



Tip: Looking for answers? Try searching our database.

Items in Combo box followed by a comma

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
foutuguy - 25 Oct 2005 09:07 GMT
Hi,

I am trying to make a small app with a combo box, a dataset and an
xmlconnector component.

The xmlconnector gets a list iof names from a database via php, then the
dataset gets it and binds to the combobox. All this process works fine, except
that all items in the combo box are followed by a comma. If instead I use a
datagrid component, there are no comma with each item.

 I read the following post about it but did not understand what I could do to
avoid these annoying commas.

http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=294&thre
adid=958802&highlight_key=y&keyword1=coma

Did someone have this problem before or would know how to solve it please?

Any help will be appreciated. Thanks in advance!

Pierrot
bambergang - 25 Oct 2005 21:20 GMT
the commas are because the combo box is being loaded by all of your fields, and
seperated by " , " marks.

use .addItem to manually add the fields that you want to the combo box.  Add
one field for the label:, another field for the data:. Have a loop do this from
counter =0 until combobox_instancename.dataProvider.length.

combobox_instancename.dataProvider.ItemAt(counter).<fieldname>  will work just
fine for getting the field values. counter will be the value of the dataset's
array index. store this index in a global variable if you want to refer to it
without looking it up every time.

it may not be as pretty as other methods, but for what you're doing it'd be
fine.  no?
foutuguy - 26 Oct 2005 12:18 GMT
Thanks for the answer!
I found this tutorial too that explains pretty well how to do that in a clean way.
http://www.macromedia.com/devnet/flash/articles/xmlconnector.html

Pierrot
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.