I don't see that this is an Ajax question at all but on most modern browsers (there used to be a problem with IE over this) you can do something like:
Code:
for (var i=0; i<values.length; i++)
{
var chk = document.createElement("input");
chk.type = "checkbox";
var id = "chkCity" + i;
chk.id = id;
chk.name = id;
document.myForm.lngCityId.appendChild(chk);
var lbl = document.createElement("label");
label.innerHTML = values[i];
label.htmlFor = id;
document.myForm.lngCityId.appendChild(lbl);
}
You may also need to create and append a br element depending on the layout you want.