br*********@yahoo.com (brian) writes:
how does document.write interpret "" and '' (double quotes and single quotes)
It doesn't. Document.write itself doesn't interpret anything. It just
writes the contents of the string argument into the document stream so
that the HTML interpreter will process it later.
The argument is a string. If you want to add quotes to a string literal,
you must escape the ones that match the ones around the literal. I.e.,
if you want a string literal to contain:
abc'def'ghi"jkl"mno
you must write either
"abc'def'ghi\"jkl\"mno"
or
'abc\'def\'ghi"jkl"mno'
That is, you escape the quotes that would otherwise end the string.
what is the significance of &Url (does it signify the current url)
It has no significance in itself. I looks like something that is used
as part of an URL itself, e.g.
http://www.example.com/request.html?...&Url=dims.html
colon : is it represented as %3A ?
and backslash represented as %2F ?
You can include both : and \ in string literals. If you want to use
them as part of an URL string, you must escape them. In that case,
they do become %3A and %5C. The character escaped as %2F is forward
slash.
My guess is that your document.write is used to write an URL. That URL
contains several arguments after a question mark. Those arguments are
separated by "&"'s, and one of them is called Url. The value of that
argument is an URL which is encoded. Most likely something like
&Url=http%3A%2F%2Fwww.example.com%2Fdims.html
/L
--
Lasse Reichstein Nielsen -
lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'