I’ve the code below written in JavaScript to add a new option to the select list from the opener window:
function updateSelectList() { var field = opener.document.objectdata.ticketPersonId; if (true && opener && 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, null); } }
works all fine in Firefox, Google Chrome etc but not IE 6 🙁 please advise how I can make this work in IE 6 aswell.
Here’s my snippet:
The definition of
horus.brokenDOMis left to the reader 🙂IIRC, I had some difficulty with using pre-defined
Optionobjects (generally pulled out of another selectbox) in this context with IE, hence the in-place object creation.