[thelist] Form generated in JS doesn't work in IE

kasimir-k kasimir.k.lists at gmail.com
Thu May 29 07:19:55 CDT 2008


Chris Price scribeva in 2008-05-28 17:03:
> I have a form generated in javascript which works fine in FF but refuses 
> to work in IE.

Instead of this:

>         var myOption = document.createElement('option');
>         myOption.setAttribute('VALUE',i);
>         myOption.appendChild(document.createTextNode(myArray[i]));

try this way:

var myOption = new Option(myArray[i], i);

And the same here:

>         var myOption = document.createElement('option');
>         myOption.setAttribute('VALUE',i);
>         myOption.appendChild(document.createTextNode(i));


var myOption = new Option(i, i);


.k



More information about the thelist mailing list