View Full Version : Adding Styles

02-26-2007, 08:44 PM
Ok this realy comprises of two questions.
Is it possible to create new styles using javascript? So for example a user could enter a custom name and define the properties?
ie "TEXT1" and then set the background colour to pink and the border to 1px solid, black.

and is it possible using a loop, to read each style that has been created or modified in to a string or something to send back to an asp page?


02-27-2007, 02:45 PM
I would do that with a php usually i make a script called config.php. This file is a list of all the attributes for the css selectors and some html attributes. This allows me to edit the styles centrally. This is a great solution if all the users of the site are to use those settings.

However if you are intending on having individuals have different settings then you could achieve this other ways maybe SESSION data or somethings.
Building a JS solution would work for this solution but not well for a universal config file