Here's a quick DOM-compliant function for getting the XSLT-like node
value for any element or text node in the DOM. (nodeType property
returns 1 for elements and 3 for text nodes)
function getText(element) {
if (element.nodeType == 1) {
var concatenation = '';
for(var i = 0; i < eleme
On Wednesday 22 December 2004 16:42, Jeff Beal wrote:
>
> The only thing that I always forget is that nodeValue() only returns a
> value for text nodes. It's not like XSLT where the text value of an
> element is the text value of all contained text nodes. So, basically,
> this.nodeValue wouldn't
Interesting... The latest O'Reilly Dynamic HTML book, which is usually
exceptional in it's completeness and quality, doesn't seem to mention that.
Maybe it's just not layed out how I would have expected and it's in another
part of the book.
In any case, thanks for the info, and for the gentle
nodeValue is part of the W3C DOM. (See
http://www.w3.org/TR/DOM-Level-2-Core for the full specification.) The
W3C DOM is a language-neutral specification for accessing a document
object model, whether HTML or XML. The org.w3c.dom package in Java 1.4
is an implementation of the standard for X
You DID put me on to one answer though... I can pass this.innerText, that
works. I'd still like to know what the nodeValue was though, I've never seen
that...
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
On Wed, December 22, 2004 3:25 p
Hmm, gotta admit you lost me Jeff... is nodeValue a property of an anchor tag?
I don't see it in my references...
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
On Wed, December 22, 2004 3:16 pm, Jeff Beal said:
> How about:
>
> property
How about:
This gets around the problem of not escaping the
back-slash altogether.
-- Jeff
[EMAIL PROTECTED] wrote:
Hello all... I have a situation where I have to insert a path into a Javascript
call, like so:
");">
Problem is, on Windows an
That's indeed what I suspected, but I was hoping...
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
On Wed, December 22, 2004 3:14 pm, Jeff Beal said:
> The filtering in probably only escapes characters that
> have significance in HTML, not
The filtering in probably only escapes characters that
have significance in HTML, not JavaScript. Since 'A:\' doesn't need to
be escaped in raw HTML content, it doesn't do anything with it.
[EMAIL PROTECTED] wrote:
Hello all... I have a situation where I have to insert a path into a Javascript
9 matches
Mail list logo