:: Forum >>

Help Me, Please. What i wrong?

from this code :
<SCRIPT>
    var gobj = new AW.UI.Group;
    gobj.setId("G1");
    
        var objl = new AW.UI.Label;
        objl.setControlText("Sex");
        
        var itemTextArray = ["Male", "Female"];
        var itemValueArray = ["M", "F"];
    
        var radio = new AW.UI.Radio;
        radio.setName("sex");
        radio.setItemText(itemTextArray);
        radio.setItemValue(itemValueArray);
        radio.setItemCount(2);
        //radio.setClass("flow", "inline");
        //radio.setClass("flow", "horizontal");
        radio.setSize(200,40);
        
        var xxx = "<br>"+objl+" : "+radio;
        gobj.setContent("object", xxx);
        
    gobj.setSize(500,200);
    gobj.setControlText("Group/Fieldset");
    gobj.setControlImage("favorites");
    gobj.refresh();
    
    /*--------------- EVENT MODULE --------------------*/
    radio.onSelectedItemsChanged = function(items){
        var index = items[0]; // assume there is one selected item
        var value = this.getItemValue(index);
        radio.setControlValue(value);
    }

    // update hidden input tag - 'data' element
    radio.onControlValueChanged = function(){
        radio.getContent("data").refresh();
    }
</SCRIPT>

Radio Button It's Not work On IE but on 'Firefox and Opera' Radio it work!
Vincent
Tuesday, April 1, 2008
Sorry, this is a bug in AW 2.5.1 - the Group class breaks event processing of other controls if you insert them inside the group using setContent() method. The only workaround is to position the controls on top of the group (using absolute or relative positioning) and not inside.
Alex (ActiveWidgets)
Tuesday, April 1, 2008

This topic is archived.


Back to support forum

Forum search