[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    changing innerhtml/text of nodes/elements
From:       George Vlahoulis <gotj () optusnet ! com ! au> (by way of George Vlahoulis <gotj () optusn
Date:       2002-12-28 8:48:58
[Download RAW message or body]

Hi,

when I do the following...

DOM::HTMLTableRowElement newrow = doc.createElement("TR");
DOM::HTMLTableElement table = doc.getElementsByTagName( "TBODY").item(0);
table.appendChild(newrow);
newrow.setInnerText(str);

DOM raises exception #7 ie NO_MODIFICATION_ALLOWED_ERR on call to
setInnerText. The same happens when I use setInnerHTML. The documents say:

Throws: DOMException, NO_MODIFICATION_ALLOWED_ERR:, Raised, if, there, is,
the, element, does, not, allow, children.

but I can quite happily, like above, create a HTMLTableCellElement and append
it. Variable str, above, contains all the text and html code like (colour
codes, alignments etc) for that row. What am I missing?

Also, when/if I get all this working, do I need to do anything to get the
KHTMLPart to update the view? I've looked but didnt see anything obvious.

Thanks.


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic