• Post Reply Bookmark Topic Watch Topic
  • New Topic

Replacing JSTL with JavaScript

 
M Burke
Ranch Hand
Posts: 406
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am now using JavaScript to alter pages based on the browser type. So I have this old server code I need to convert. How can I do it?

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't. JavaScript executes on the browser long after the <c:if> is evaluated on the server.
 
M Burke
Ranch Hand
Posts: 406
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to replace the server-side JSTL in a JSP page with client-side script, you sort of have to do it all at once -- at least the parts that are related to each other.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!