[thelist] IE-Select box render bug or my bad?
Joshua OIson
joshua at alphashop.net
Tue Mar 13 09:59:13 CST 2001
Believe it or not, using the code you provided doesn't seem to cause the
same rendering bugs that the code I was using caused. Thank you for your
help.
-joshua
<tip type="Internet Explorer" type="Dynamic Select Elements">
MSDN suggests using CreateElement, innerText, and value combination to
create dynamic OPTIONs for a SELECT box, and removeElement to delete an
OPTION from a SELECT box. If you follow their code and find that the SELECT
box behaves poorly on insert and delete--as in rendering problems where
options seem to be cut off--try using the Option objects instead. For
example:
function addItem(email)
{
var newOption = new Option(email,email);
document.forms[0].myselect.options[document.forms[0].myselect.options.length
]=newOption;
}
function dropItem()
{
document.forms[0].myselect.options[document.forms[0].myselect.selectedIndex]
=null;
}
</tip>
More information about the thelist
mailing list