[Javascript] displaying single quotes or double quotes in jav ascript alert

Muchacho, Laurent (TWIi London) LMuchacho at twii.net
Fri Jul 6 08:35:22 CDT 2001


Hi 

Your solution it's quite simple write \" or \' backward slash in front of
the quote or the single quote

Laurent

-----Original Message-----
From: Russell Scheinberg [mailto:rscheinberg at lrk.com]
Sent: 06 July 2001 14:27
To: javascript at LaTech.edu; aspfreeforall at ls.asplists.com
Subject: [Javascript] displaying single quotes or double quotes in
javascript alert


I am trying to create some alerts in javascript that make reference to
variables created with ASP. I can get the data in the variables to display
just fine, except when they contain single or double quotes, which of course
causes a problem in the string and a error to occur. I was wondering if
there is a display code for these characters as there is in visual basic or
html (&rsquot;,") that I could do a Replace() with and not cause the
script to choke. 

Thanks. 


_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
http://www.LaTech.edu/mailman/listinfo/javascript




More information about the Javascript mailing list