This week's giveaway is in the Java/Jakarta EE forum.
We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line!
See JSP. I have a javascript function that dynamically creates new rows in a table already defined in the html. I want to put a variable defined in jsp into the javascript function, how do i do that? Here is the javascript function:

Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to display the value of any jsp variable (assuming a proper toString() conversion) just type <%= variable %> inline to the javaScript code.
var javascriptVar = '<%= jspVariable %>';
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!