Any hints as to how one might be able to grab the innerHTML out of the
document in order to send it to a server for processing
?
Thanks,
Thad
<html>
<script> window.onload = CheckIt;
function CheckIt() {
var oDoc = document.getElementById("CheckIt");
if (oDoc) alert(oDoc.innerHTML);
}
</script>
<body>
<span id="CheckIt">Help <b>meee</b></span>
</body>
</html>
<!--end of xmp tag-->
</xmp>
"Thad Hoffman" <thad.h...@gogallagher.com> wrote in message news:9gaka0$ab...@secnews.netscape.com...
InnerHTML is a property of HTML documents only. You could use my javascript
range patch to get the xml markup of the document (the propertly is xml).
The problem though is that Mozilla has created a bug after 0.9 (and is still
in 0.9.1) that does not expose the prototype of DOM objects, nor many of the
constructor objects. If you want to try the patch goto:
http://www.pbwizard.com/Articles/Moz_Range_Object_Article.htm
If you follow the code for where I add the xml property (same as M$ XML
document's xml property) then you will find that you can modify the code to
get the xml.
Jeff Yates
http://www.pbwizard.com
"Jiri Znamenacek" <pi...@kolej.mff.cuni.cz> wrote in message
news:3B2D1A42...@kolej.mff.cuni.cz...
Thanks for the info and the link.
A little background to my inquiry:
I am attempting to implement a web application in Netscape 6.x/Mozilla
comparable to IE 5.5's abililties.
Without using the MSXMLDOM ActiveXObject, I can build an XML element that
IS an HTML element. I can
add to and edit the nodes then just grab the innerHTML of the xml element
and ship it off to the server. Then have the server
return a new node (aka innerHTML) to the xml element for the client to
interact with.
I went this route in hopes that Netscape/Mozilla would behave similarly.
Since there currently isn't an MSXMLDOM-like feature completely
implemented yet. I wanted to avoid having to fork everything.
But Netscape/Mozilla won't allow the document.createElement('xml') to work,
let alone any other non html 4 tag. Making it
difficult to work with XHTML.
I can use the document.implementation.createDocument() which is great, but
in Netscape 6.01, there is know built in way to serialize that xml
into a string so I can send it into the server (all via soap and http),
which is why I was trying to get the innerHTML to work. I can make the XML,
but
can't seem to get it back out.
Thad
"Jeff Yates" <pb...@pbwizard.com> wrote in message
news:9gikc1$89...@secnews.netscape.com...
You are wanting to be able to communicate to the server with XML, then you
need to use Nescape 6.1 (currently released in Preview Release 1). It
supports the XMLHTTPRequest object. It is the first Netscape to offer it.
Mozilla has offered it since 0.8.1, and IE from 5.0. See:
http://unstable.elemental.com/mozilla/build/latest/mozilla/extensions/dox/cl
ass_nsIXMLHttpRequest.html
For just downloading I have a binding/behavior pair that adds this
functionality for text and xml documents. See:
http://www.pbwizard.com/Articles/DownloadDoc.htm
Hope this helps.
Jeff Yates.
http://www.pbwizard.com
"Thad Hoffman" <thad.h...@gogallagher.com> wrote in message
news:9gl6pg$i5...@secnews.netscape.com...
Thanks again for the info. I was planning on using the XMLHTTPRequest
object, I have played with it in Mozilla and IE, and I am glad
is has made it into the Netscape version, as we have to use Netscape as our
browser (well I.E. 5.5 and Netscape 6 are the
system requirements we were given).
Do you know, off hand, if the XMLSerializer has been implemented in 6.1 as
well? That is the piece I really need. We have been using a Java Applet to
handle the http request until it got rolled into a Netscape release, but I
need a way to get the xml document into a string...
Thanks for all your help.
Thad
"Jeff Yates" <pb...@pbwizard.com> wrote in message
news:9glauc$ia...@secnews.netscape.com...
Thad Hoffman wrote:
> Do you know, off hand, if the XMLSerializer has been implemented in 6.1 as
> well? That is the piece I really need. We have been using a Java Applet to
> handle the http request until it got rolled into a Netscape release, but I
> need a way to get the xml document into a string...
--
Heikki Toivonen
Is there a bug in Bugzilla for DOM Level 3 Load & Save?
-myk