hi,
i'm trying to modify html in the browser via a java applet. i'm using the
org.w3c.dom.htm l and com.sun.java.br owser.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.getElementB yId("ourForm");
HTMLDivElement screen;
HTMLParagraphEl ement label;
HTMLInputElemen t field;
if (advForm == null)
throw new Exception("Cann ot find 'ourForm' Id");
screen = (HTMLDivElement ) doc.createEleme nt("div");
advForm.appendC hild(screen);
//try and add a label
label = (HTMLParagraphE lement) doc.createEleme nt("p");
screen.appendCh ild(label);
label.appendChi ld(doc.createTe xtNode("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.
i'm trying to modify html in the browser via a java applet. i'm using the
org.w3c.dom.htm l and com.sun.java.br owser.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.getElementB yId("ourForm");
HTMLDivElement screen;
HTMLParagraphEl ement label;
HTMLInputElemen t field;
if (advForm == null)
throw new Exception("Cann ot find 'ourForm' Id");
screen = (HTMLDivElement ) doc.createEleme nt("div");
advForm.appendC hild(screen);
//try and add a label
label = (HTMLParagraphE lement) doc.createEleme nt("p");
screen.appendCh ild(label);
label.appendChi ld(doc.createTe xtNode("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.