3.2.0

How To Get Value From Input Object ?

You can tell me more .
How the way to get value from object input (AW.UI.Input) ?
And If it can sent value with form ,Please tell me to .
Vincent
March 25,
You can get input text with getControlText() method.

To send the value with the form submit use setName() method to specify parameter name -

http://www.activewidgets.com/javascript.forum.22088.2/newbie-how-do-i-retrieve.html
Alex (ActiveWidgets)
March 26,
And How to setName to AW.UI.Radio ?
Ex
var itemTextArray = ["Male", "Female"];
var itemValueArray = ["M", "F"];
var radio = new AW.UI.Radio;
radio.setId("sex");
radio.setName("sex");
radio.setItemText(itemTextArray);	
radio.setItemValue(itemValueArray);
radio.setItemCount(2);	 
radio.refresh();

I will add any think more ?
Vincent
March 26,
For lists you have to specify what is 'control value' and also make sure the hidden input tag is updated -

// set control value when list item is selected
radio.onSelectedItemsChanged = function(items){
    var index = items[0]; // assume there is one selected item
    var value = this.getItemValue(index);
    this.setControlValue(value);
}

// update hidden input tag - 'data' element
radio.onControlValueChanged = function(){
    this.getContent("data").refresh();
}
Alex (ActiveWidgets)
March 27,
Thank you
March 27,

This topic is archived.

See also:


Back to support forum