I'm creating a combo box which loads options from JSON..Its loading the menus as expected.But I need to display the text "Select the one" in the combo box by default. I tried but can't find the solution..Can you advice me,How can i achieve it?
window.onload = function() {
var obj = JSON.parse(str);
for (var i=0; i < obj.MenuParentTabs.length; i++) {
var option = document.createElement("option");
option.innerHTML = obj.MenuParentTabs[i].parentTabName;
document.form1.fruits.appendChild(option);
}
}