Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jsp tags inside javascript function  RSS feed

 
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
Posts: 66141
141
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
Posts: 66141
141
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 ]
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!