-
Notifications
You must be signed in to change notification settings - Fork 1
DefinedDropDown
jdubs edited this page Oct 23, 2016
·
1 revision
This widget creates a drop down list of defined values and text and stores selections in text spec control.
<span class="States">[[TextSpec]]</span><div>[[TextSpec]]</div>
spec['TextSpec'].statedropdown({
valueType: "abbr",
displayType: "full"
});
spec['TextSpec'].countrydropdown();- valueType: Defines the value stored for the spec. Choices include: "abbr" and "full". "abbr" stores the abbreviation, and "full" stores the full name (Ex: full = abbr / Alabama = AL)
- displayType: Defines the display text for the dropdown. Principles are the same as valueType
- debug: True or false. When true the control holding the value is displayed.
onChange(): Triggered when the selection changes.
- selectedValue(): Gets the currently selected value.
- selectedText(): Gets the currently selected display value.
- selectedIndex(): Gets the currently selected index (0 based).
spec['TextSpec'].statedropdown.onChange = function() {
alert(spec['TextSpec'].statedropdown.selectedText());
}
spec['TextSpec'].countrydropdown.onChange = function() {
alert(spec['TextSpec'].countrydropdown.selectedIndex());
}