:: Forum >> Version 2 >>

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
Tuesday, March 25, 2008
You can get input text with getControlText() method.

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

/javascript.forum.22088.2/newbie-how-do-i-retrieve.html
Alex (ActiveWidgets)
Wednesday, March 26, 2008
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
Wednesday, March 26, 2008
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)
Thursday, March 27, 2008
Thank you
Thursday, March 27, 2008



This topic is archived.

Back to support forum

Forum search