This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara 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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA 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: 61105
    
  66

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]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Set css values dinamically pressing buttons