This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Set css values dinamically pressing buttons Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Set css values dinamically pressing buttons" Watch "Set css values dinamically pressing buttons" New topic
Author

Set css values dinamically pressing buttons

Dura Hurtado
Ranch Hand

Joined: Feb 16, 2011
Posts: 120
Hi, which I am trying to do is as follows, and I don´t know if it is possible, well the thing is that I would like build a .css dinamically,

I mean load a .css with the properties reset, and be able to set color=red, pressing a button, using a back bean like in JSF, that way I would write 'red' in an input text(#{Content.color}) in the .xhtml file, and would retrieve the value from the .css the same way using jquery

I know the question is a little confusing but I am googling about it but I haven´t clear my ideas about.


¿Any clue?

Thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60747
    
  65

I can't tell what you are actually asking, and bringing in JSF-specific concepts in this forum will not be helpful, but you can dynamically add styles to elements, as well as change their class list with jQuery. These are the supported ways of changing the styles of elements.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
Don't get me started about those stupid light bulbs.
 
subject: Set css values dinamically pressing buttons
 
Similar Threads
jquery and css trying to retrieve a value from a .js file
jsp site organization all in CSS
CSS Inheritance
Liquid LayoutManager
set the size of an image