Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
    Bookmark Topic Watch Topic
  • New Topic

JSTL tag with javascript

Ram Gokul
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Report post to moderator
I am using a variable in javascript like below in my jsp .( It has a struts tag but still can comeup with any JSTL tag )

newitem = '<logic:notEmpty name="user" property="Languages".........>';

This when parsed in JSP and sent to BRowser is giving me a "unterminated string constant" error . The line is :

newitem = '<select name="defaultLanguage" class="logonTextBox"><option value="E" selected="selected">English</option>
<option value="ZH-T">Chinese Traditional</option>
<option value="AR">Arabic</option>
<option value="FA">Persian</option>

We can see the problem . But how do i solve this.
I dont know whhether this is javascript or JSTL tag problem.

Moderator : This is a followup question from another thread in "HTML and javascript " . As other fellow JSP developers might have slved the problem , I am posting it here since it deals with JSTL tags.Thanks.

Bear Bibeault
Author and ninkuma
Posts: 65278
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place.

If you think a topic is in the wrong forum, ask to have it moved. Do not cross-post.
    Bookmark Topic Watch Topic
  • New Topic