Add To AW.UI.List
Is there a quick way to add item(s) to the List control that I can't seem to find? Or, do I have to add to the Javascript array and call a refresh on the List object?
Here's the sample code. I need to modify a list (creatively called myList) in line 17-19:
Here's the sample code. I need to modify a list (creatively called myList) in line 17-19:
var groupAdd = new AW.UI.Button();
groupAdd.setId("groupAdd");
groupAdd.setControlText("Add An Empty Group");
// button click action
groupAdd.onControlClicked = function(event) {
if ( isExtAlphaNumeric(document.getElementById("groupName").value) ) {
var r = new AW.HTTP.Request;
r.setURL("addCommissionGroup.asp");
r.setRequestMethod("POST");
r.setParameter("GName", document.getElementById("groupName").value );
r.request();
r.response = function( data ) {
if ( data != "SUCCESS" ) {
alert( data + " Group was not added." );
}
else {
// modify list here
}
}
}
};
document.write(groupAdd);
Paul Tiseo
April 20,