Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to write a JSP code in javascript?

 
Sasikumar Senthilnathan
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my JSP file I need to rewrite the content of a <div> using Java script. <div> contains the JSP scriptlet tag.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65537
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With the usual caveat about scriptlets being technology that is over 12 years out-of-date (12 years!) and should not be used, you can make an Ajax request to the server and load the result into the DOM.

The jQuery .load() method is one of the easiest ways to do this.
 
Sasikumar Senthilnathan
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks!!!
 
The government thinks you are too stupid to make your own lightbulb choices. But this tiny ad thinks you are smart:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!