Re: block writing
- From: Joost Diepenmaat <joost@xxxxxxxxx>
- Date: Thu, 28 Feb 2008 16:00:02 +0100
hendedav@xxxxxxxxx writes:
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?
Oh right. You mean you have to escape the quotes inside a quoted
string. There's no way around that if you use string literals.
It's annoying, of course, but I don't really see that there is a
problem. You generally don't put large sections of text in string
literals, and if you really want to you can easily write a short script
that generates the string literal for you:
$ perl -e '$_=join("",<>);s/\n/\\n/g;s/"/\\"/g;print qq("$_")' my.html
--
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/
.
- Follow-Ups:
- Re: block writing
- From: hendedav
- 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
- Re: block writing
- From: hendedav
- block writing
- Prev by Date: Re: block writing
- Next by Date: Re: Ajax / Safari Problem
- Previous by thread: Re: block writing
- Next by thread: Re: block writing
- Index(es):
Relevant Pages
|