Shame it cannot be done in Javascript, but I guess I understand the
reasons for this - being a client side language I guess the security
risk would be huge!!
Have been looking at doing it in PHP, and have come up with two
distinct ways of doing this:-
1) PHP creates stylesheet text file based on entries on form on
webpage.
2) MySQL database table stores key/value pairs for stylesheet
attributes, then a function goes through the table and creates the
stylesheet on the fly (i.e., every webpage needing the stylesheet runs
the function at the top).
Any suggestions on which would be the most efficient/easiest to
implement etc. (or any other ideas on how to do this!!) ?
Many thanks,
Jacqueline
"Fabian" <la****@hotmail.com> wrote in message news:<br************@ID-174912.news.uni-berlin.de>...
Jacqueline hu kiteb:
Hi,
I would like to be able to write some code in Javascript preferably
(PHP is also all right) which allows the admin of a website to be able
to change stylesheet attributes from a GUI browser interface without
having them to change the text file themselves. (i.e., working on the
supposition that the admin is IT illiterate). Simple things like
table heading colours, backgrounds, font sizes need to be changed this
way.
The browser should then read from the changed textfile the next time
the site is refreshed and it should therefore be permanent. Is this
at all possible? If so, how do I update the textfile?
Cant be done in javascript. Javascript cant write to a file (except in
cookies), although it can generate text which can then be c&p into a
text file.
--