• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Jsp in Javascript || Javascript in Jsp

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I'm VERY new in 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:

thanx,
Samer
 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
ie.
var javascriptVar = '<%= jspVariable %>';
reply
    Bookmark Topic Watch Topic
  • New Topic