Forum Moderators: not2easy

Message Too Old, No Replies

Changing a style in function of content.

From an occasional HTML user.

         

sermil

6:35 pm on Feb 1, 2004 (gmt 0)


I've read in different places that adding script to a CSS file is a bad habit. But I have the following problem: I cannot modify a JSP page that generates an HTML tree. The tree nodes are associated to gif pictures in a CSS file. I wish to modify which gif is attributed in function of the content of the tree node, which is plain text, in order for the nodes to reflect this content. Is there a way, other than by adding JScript to the CSS, to detect a code in the text so as to apply the proper node style?
Thank you in advance for your reply.

Purple Martin

9:56 pm on Feb 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think you could do it server-side by writing another jsp file: it should take the output from the first jsp file, and then make the required changes and spit out the correct css.