hi,
i'm trying to modify html in the browser via a java applet. i'm using the
org.w3c.dom.html and com.sun.java.browser.dom packages to do this. i can
get and set the title as per the sun example, but when i try something
like:
Element advForm = doc.getElementById("ourForm");
HTMLDivElement screen;
HTMLParagraphElement label;
HTMLInputElement field;
if (advForm == null)
throw new Exception("Cannot find 'ourForm' Id");
screen = (HTMLDivElement) doc.createElement("div");
advForm.appendChild(screen);
//try and add a label
label = (HTMLParagraphElement) doc.createElement("p");
screen.appendChild(label);
label.appendChild(doc.createTextNode("label"));
i get no errors, but neither does anything happen.
am i doing something wrong, or does java dom not work. i've read
previous posts saying this, but had hoped it was fixed by now.
i'm using mozilla 1.4.2 and java 1.5
thanks,
mike.