Hi there! I have trouble with using swapDOM. It simply does not work. Please, can someone point me to the right direction to get it working?
Here's the TestCase: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>swapDOM Test</title> <script src="MochiKit.js" type="text/javascript"></script> </head> <body> <h1 id="that">Old Text</h1> <a href="javascript:MochiKit.DOM.swapDOM('that', '<h1>New Text</ h1>');">change</a> <a href="javascript:MochiKit.DOM.swapDOM(document.getElementById('that'), '<h1>New Text</h1>');">change2</a> <a href="javascript:MochiKit.DOM.swapDOM(getElement('that'), '<h1>New Text</h1>');">change3</a> </body> </html> Basically, tag H1 shall be replaced. This doesn't work, neither in Firefox 2.0.0.3 nor with IE 6.0.2900, not with MochiKit 1.3.x nor with MochiKit 1.4 (from trunk) (both in their packed versions). With FF I get this error: > Fehler: uncaught exception: [Exception... "Component returned failure code: > 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMHTMLBodyElement.replaceChild]" > nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: > file:///.../MochiKit.js :: anonymous :: line 2931" data: no] ... and IE says there is an invalid argument in that line. -- Mark --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~----------~----~----~----~------~----~------~--~---
