Hi, I would like to create the DOM structure from my page by reading a local HTML file into a string, and then convert it to Mootools Elements using "var view = Elements.from(myHtmlString)".
Reading the file, and converting it to Elements works fine. No problem modifying these elements either. But then I want to insert "view" somewhere in my markup, like "parentTag.grab(view)". And this fails with error "uncaught exception: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMHTMLDivElement.appendChild]" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: http://localhost/libs/mootools/mootools-core-1.4.0-full-nocompat.js :: <TOP_LEVEL> :: line 3095" data: no] http://localhost/libs/mootools/mootools-core-1.4.0-full-nocompat.js Line 2071" The HTML file read has a "div" tag that wraps all the markup. I don't see where I went wrong, can someone help in a way, such as giving a sample code that works? Cheers!
