I am creating a dynamic menu for years (2005->…), which works fine in FF but in IE the value is created and is selectable, but text is blank. I have encountered this problem 3 times, but I was not able to find any other posts on the subject and I still don’t have a solution, so perhaps I am going about it all wrong. Is there another way to insert text into an option element other than what I’ve done below? Has encountered this problem? PLEASE HELP!
Here is my code:
[CODE]
var yr = new Date();
yr = yr.getFullYear();
for (var i = 2005; i <= yr; i++) {
var opt = document.createElement(“option”);
opt.setAttribute(“value”, i);
opt.text = i;
menu.appendChild(opt);
}