faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

13 of 22 people (59%) answered Yes
Recently 8 of 10 people (80%) answered Yes

Entry

How do pass the jsp variable that contained single quote as parameter to scripting function in jsp

Apr 8th, 2008 18:38
ha mo, Dave Clark, Ramya Arumugam,


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ramya,
     This isn't actually a JavaScript question, so I can supply you no 
code for this.  But, the answer is that you can either enclose the 
outer string in double quotes or you can escape the single quote using 
the back-slash character before sending that value to JavaScript.  The 
following are examples of those two techniques using a JavaScript 
string literal in the same manner:
var str1 = "Dave Clark's Answer String";
var str2 = 'Dave Clark\'s Answer String';
Take care,
Dave Clark
www.DaveClarkConsulting.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com