Re: block writing
- From: hendedav@xxxxxxxxx
- Date: Thu, 28 Feb 2008 06:43:17 -0800 (PST)
On Feb 28, 9:16 am, Joost Diepenmaat <jo...@xxxxxxxxx> wrote:
hende...@xxxxxxxxx writes:
Thanks for the replies. Unfortunately in both of those instances, I
will still have to escape the xhtml portion. That is the part I am
looking at not having to do. The <pre> tags work for preformatted
text and wouldn't apply to changing or writing content in javascript.
The second example, I will still have to escape the xhtml code because
it falls between two quotes (""). Thanks again though. If anyone
else has any ideas, please let me know.
As I said above:
var element = document.getElementById("some id");
element.appendChild(document.createTextNode("<your text>"));
That *will* escape anything.
--
Joost Diepenmaat | blog:http://joost.zeekat.nl/| work:http://zeekat.nl/
Joost,
I tried, as you suggested, and it didn't work as I thought. The
below is the code:
var element = document.getElementById("divTFooter");
element.appendChild(document.createTextNode("this is an example of a
link: <a href="test.html">link</a>"));
and I got a "missing ) after argument list" error after the quote
right before the test.html name. I will need to find something that
doesn't have quotes as the delimiters. Thanks though, any other
ideas?
Dave
.
- Follow-Ups:
- Re: block writing
- From: SAM
- Re: block writing
- From: Joost Diepenmaat
- Re: block writing
- References:
- block writing
- From: hendedav
- Re: block writing
- From: Erwin Moller
- Re: block writing
- From: Joost Diepenmaat
- Re: block writing
- From: hendedav
- Re: block writing
- From: Joost Diepenmaat
- block writing
- Prev by Date: Re: best practice - for a keylistener
- Next by Date: Re: block writing
- Previous by thread: Re: block writing
- Next by thread: Re: block writing
- Index(es):
Relevant Pages
|