I have three combo boxes.
The value of the third combo box populates depending on the query fired by the values of the first two combo boxes. A query gets fired each time the value of the first two combo box are changed.
When the combined values return an empty json i show a message. The problem i am facing is that each time i change the value of the combo box and get and empty JSON the error messages are appended i.e. for every time I get an empty JSON the error messages are appended showing me error messages those many number of times.
As in the example the number of alerts increments each time i get an empty JSON.
Using HTTP proxy to get the JSON response for the third combo box.
Any reasons.

<code> if(cmbSupJobTitle.getValue==null || cmbSupDepartment.getValue()==null || cmbSupJobTitle.getValue()=='' || cmbSupDepartment.getValue()==''){alert('empty combo boxes');}else{
storeSuperior.load({params:{supJobTitle: cmbSupJobTitle.getValue(), supDepartment: cmbSupDepartment.getValue()}});
alert("No Employee exists with the selected combination of Department and Job Title!");

var index = storeSuperior.find('name',objBean.employeeList[0].superior);
var rec = storeSuperior.getAt(index);
if(rec == null){
var hiddenValue = rec.get('pid');
} </code>