• Post Reply Bookmark Topic Watch Topic
  • New Topic

Dynamically changing class attribute of TD without Scriptlet  RSS feed

 
Mahendran Aiyappan
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I want to know whether their is way to dynamically change the class attribute of the TD tag.

I don't want to use any scriptlet.

Please give me your comments.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you writing the class attribute?
When do you want it to change?
 
Mahendran Aiyappan
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ben Souther,

In my project I am using a custom calendar. I have a set of classes in CSS such as ,

.one_form {
bla bla bla
}
.two_form {
bla bla bla
}

According to some database values the any one of the class name should be assigned to TD.
<TD class="dynamic_value">

Is it any possibility without using Scriptlets.

If there is no possibility please show me the Scriptlet way.

Thanks for your comments.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66152
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are using JSP 2.0, you shouldn't be using scriplets at all. Use the JSTL and El instead.
 
Balaji Sampath
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about using javascript !!
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66152
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Balaji Sampath:
How about using javascript !!


Javascript has no direct access to database information.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!