for ( var i = 0; i < selection.length; i++) {
console.log(selection[i].data.all);
selected.push(selection[i].data.all); //How to make 'selected' variable empty before pushing values again. Or Any other way to acieve thae same.
}

console.log(selected);

popUp.hide();
});

}

vietits

2 Sep 2012, 3:55 PM

Try this

for ( var i = 0; i < selection.length; i++) {
console.log(selection[i].data.all);
selected = []; // or Ext.Array.erase(selected, 0, seletecd.length);
selected.push(selection[i].data.all); //How to make 'selected' variable empty before pushing values again. Or Any other way to acieve thae same.
}