Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Unterminated String constant javascript error while handling textarea in ja

843840Feb 12 2009 — edited Feb 13 2009
hi,

my code is -->

<textarea class = "ipfield" rows="2" cols="80" name = "ruleDesc" id = "ruleDesc" onchange="setIsEdited()"><c:out value="${ruleDesc}" escapeXml="false"/></textarea>

on click of cancel it should be reseated to previously present in ModelAnd View(MAV) object

code is document.getElementById('ruleDesc').value = '<c:out value="${ruleDesc}" escapeXml="false"/>';

but m getting javascript error while setting tht one

i view tht source in IE.

that is because of
it looks like ->
document.getElementById('ruleDesc').value = 'this is the data from database
ok ?'

if there is \n in database it will go to next line because of that *'* after document.getElementById('ruleDesc').value is not completed

can u please help me about that problem.

thanx in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 13 2009
Added on Feb 12 2009
3 comments
516 views