[Dojo-interest] ComboBox - disregards value attribute

jforrester jeff.forrester at gmail.com
Wed Mar 31 13:36:25 EDT 2010


The documentation for a dijit.form.ComboBox states: "The drop down box's
values are populated from an class called a data provider, which returns a
list of values based on the characters that the user has typed into the
input box. If OPTION tags are used as the data provider via markup, then the
OPTION tag's child text node is used as the widget value when selected. The
OPTION tag's value attribute is ignored. To set the default value when using
OPTION tags, specify the selected attribute on 1 of the child OPTION tags.
Some of the options to the ComboBox are actually arguments to the data
provider."

I am having a problem with the part that states: "The OPTION tag's value
attribute is ignored."

I am using a comboBox to replace a standard html select. The server is
expecting the value attribute for a given selected option to be submitted,
not the innerHTML text label for a given option. I need the value attribute
of the option tag to be submitted.

Is there any easy way to accomplish this? Am I using the wrong kind of dijit
to duplicate the behavior of a standard html select?

Thanks in advance!
-- 
View this message in context: http://n3.nabble.com/ComboBox-disregards-value-attribute-tp688928p688928.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.


More information about the Dojo-interest mailing list