Hi
my code is above:
function createCombo(){
var selectElement = document.createElement(“SELECT”);
selectElement.setAttribute(“ID”,”1″);
selectElement.setAttribute(“name”,”phoneModels”);
alert(document.getElementsByName(“phoneModels”));
for(rowIndex = 0; rowIndex < models.length; rowIndex++ ){
var oOption = document.createElement(“OPTION”);
selectElement.options.add(oOption);
oOption.innerText = models[rowIndex][0];
oOption.value = models[rowIndex][1];
}
alert(document.getElementById(“1”));
}
alert(document.getElementsByName(“phoneModels”)) command prompts [B]object
alert(document.getElementById(“1”)) command prompts [B]null
i couldn’t solve the problem
please help
thanks