|
cloning nodes vs. creating new() ones: msg#00069java.enhydra.xmlc
In my HTML I have a dropdown list with one teacher option. I'm using cloneNode() to create another <option> element and calling cloneNode() on that teacher's <option> to create the text that goes <option>right here</option>. I'm using cloneNode() because I don't know how to go about creating a new object that implements HTMLOptionElement. Is the way I'm doing this how its supposed to be done, by using the w3c API, or is there a better way to instantiate new XMLC specific objects and add them to the HTMLSelectElement? Thanks, -M@ HTMLSelectElement teacherDropdown = form.getElementTeacherDropdown(); HTMLOptionElement teacher1 = form.getElementTeacherOption(); HTMLOptionElement teacher2 = (HTMLOptionElement) teacher1.cloneNode(false); teacher2.appendChild(teacher1.getFirstChild().cloneNode(false)); teacher2.getFirstChild().setNodeValue("Mr. Snyde"); teacher2.setValue("2");
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | some bug fixes committed..., Jacob Kjome |
|---|---|
| Next by Date: | Re: some bug fixes committed..., Matthew Hixson |
| Previous by Thread: | some bug fixes committed..., Jacob Kjome |
| Next by Thread: | Re: cloning nodes vs. creating new() ones, Jacob Kjome |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |