• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to change image using jsp

 
maznorlia syafina
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having a problem on how to change an image using logic.Let say that the logic is like this.If year profit is over 50% I want the image to display in green box and if the year profit is below 20% the image will be displayed in red.How can I do that?Can somebody help.Please..
 
ramprasad madathil
Ranch Hand
Posts: 489
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The easiest approach would be to have 2 images, one green and other red and display one of the images based on your 'if' logic.

ram.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65129
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out the JSTL <c:if> tag.
 
maznorlia syafina
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks ram..got it
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic