473,387 Members | 1,683 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

document.write question

how does document.write interpret "" and '' (double quotes and single quotes)

what is the significance of &Url (does it signify the current url)

colon : is it represented as %3A ?
and backslash represented as %2F ?
Jul 20 '05 #1
1 2153
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.'
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: James Marshall | last post by:
I'm writing a library where I want to override document.write(), but for all document objects; thus, I want to put it in the prototype. I tried Document.prototype.write= my_doc_write ; but it...
2
by: Brett Baisley | last post by:
Hello I have a block of html code that I want to run by calling a javascript function to print it. Its basically a table with menu items in it that is the same for many pages, and instead of...
12
by: *.* | last post by:
Hey- I seem to be having a problem with the document.lastModified property. The way it is suppose to work is that it returns the date and time at which the document was last modified. IN my...
13
by: Stumped and Confused | last post by:
Hello, I really, really, need some help here - I've spent hours trying to find a solution. In a nutshell, I'm trying to have a user input a value in form's textfield. The value should then be...
4
by: Prowler | last post by:
In the application we are currently building, we need to write positioning code on-the-fly, based upon the screen offset of the element in the AS/400 application which drives the Web app. The 400,...
0
by: Novice | last post by:
Hi all, I'm a novice VB.NET and VBA programmer and am wondering if there is a tutorial out there on how to create a word document based on data in a database and then return that document to a web...
7
by: Andrea | last post by:
Hi there - I'm hoping someone can help me; I've been struggling with this for a few days! :-) I have a webpage that is comprised of many forms containing questions. As the user answers one...
10
by: Geoff | last post by:
I am using the following statement in a script: If (res == 123) document.write (" Blah Blah"); else document.write (" XYZ"); This of course brings up a new page on my site and prints Blah...
9
by: sonnystarks | last post by:
I am taking a course in writing javascript and it (and all the books I have been reading) tell me that if I will use the document.write syntax, I will be able to "place text on the page." None...
2
by: ethandbrown | last post by:
Hi All-- I'm a bit stymied here. I need to display arbitrary HTML obtained through AJAX. The problem is when a <script> block is encountered one can't use innerHTML to set the content, because...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.