Index: ecma/kjs_html.cpp =================================================================== RCS file: /home/kde/kdelibs/khtml/ecma/kjs_html.cpp,v retrieving revision 1.77 diff -u -r1.77 kjs_html.cpp --- ecma/kjs_html.cpp 2001/02/03 21:20:35 1.77 +++ ecma/kjs_html.cpp 2001/02/10 07:29:12 @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -1075,7 +1076,16 @@ DOM::HTMLOptionElement option = element; // read-only: form if (p == "defaultSelected") { option.setDefaultSelected(v.toBoolean().value()); return; } - // read-only: text + // read-only: text <--- According to the DOM, but JavaScript and JScript both allow changes. + // So, we'll do it here and not add it to our DOM headers. + else if (p == "text") { DOM::NodeList nl(option.childNodes()); + for (unsigned int i = 0; i < nl.length(); i++) { + if (nl.item(i).nodeType() == DOM::Node::TEXT_NODE) { + static_cast(nl.item(i)).setData(str); + return; + } + } + return; } // read-only: index else if (p == "disabled") { option.setDisabled(v.toBoolean().value()); return; } else if (p == "label") { option.setLabel(str); return; }