javascript - Add <option> in IE 6 unwards -


I have the code below in JavaScript to add a new option to the selection list from the Opener Window:

function update selection list () {var field = opener.document.objectdata.ticketPersonId; If (true & amp; amp; opener & amp; field) {var val = document.createElement ('option'); Var title = document.objectdata.titleId.options [document.objectdata.titleId.selectedIndex] .text; Val.text = title + '' + document.objectdata.firstName.value + "+ document.objectdata.lastName.value + ':' + document.objectdata.username.value; Val.value = null; Val.selected = true ; Field.add (val, tap);}}

All works fine in Firefox, Google Chrome etc, but not IE 6 :-( Please advise that I 6.

This is my snippet:

 < Select the code> if (oldopt! = Null ||! Horus.brokenDOM). Definition of   

[newopt, oldopt]; newopt = options [options.length] = new option ( Newopt.text, newopt.value, false, false); Horus.brokenDOM leave the reader IIRC has some difficulty with the pre-defined options objects (usually exits from the other selection box) with this reference with IE, so in- Object Object Generation.


Comments