:: Forum >>
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:
var groupAdd = new AW.UI.Button();
groupAdd.setId("groupAdd");
groupAdd.setControlText("Add An Empty Group");
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 {
}
}
}
};
document.write(groupAdd);
Paul Tiseo
Thursday, April 20, 2006
Paul,
currently there is no add/deleteItem methods for the list controls. You have to modify the data array and then refresh the full list.
Alex (ActiveWidgets)
Thursday, April 20, 2006
This topic is archived.
Back to support forum
Forum search