Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp tags inside javascript function

 
shah rah
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


list1 size is 10 records
list2 size is 10 records
list3 size is 13 records


if I pass 1 to the function. , I get first alert "list1 size = 10 "
but the last alert which displays the List size = as 13.


if I pass 2 to the function. , I get second alert "list2 = 10"
but the last alert which displays the List size = as 13.



what is the reason? how are jsp scriptlets executed inside javascript?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64623
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nothing to do with Struts. Moved to the JSP forum.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64623
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by shah rah:
how are jsp scriptlets executed inside javascript?


They aren't. Scriptlets -- along with all other server-side mechanisms -- are executed on the server long before the HTML page is sent to the browser and the JavaScript executes.

Perhaps this article will be helpful.
[ April 16, 2007: Message edited by: Bear Bibeault ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic