Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Advanced Techniques / September 2007



Tip: Looking for answers? Try searching our database.

Edit CSS in Textarea

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ready4god2513 - 21 Sep 2007 03:31 GMT
I need to be able to open up a given css file (I have the exact location on the
server) in a textarea and edit and then re-save that file.  Does anyone know
how to do that (I would prefer to stay away from using a database table for
this action).
Azadi - 21 Sep 2007 03:50 GMT
> I need to be able to open up a given css file (I have the exact location on the
> server) in a textarea and edit and then re-save that file.  Does anyone know
> how to do that (I would prefer to stay away from using a database table for
> this action).

- use <cffile action="read" variable="somevarname"
file="fullabsolutepathtoyourcssfile"> to read your css into a variable
(use expandpath() to convert rel path to abs path if needed)
- populate your textarea with the #somevarname#
- make necessary chnages
- use <cffile action="write" file="fullabsolutepathtoyourcssfile"
output="#form.yourtextareaname#" nameconflict="overwrite"> to save the
changes

hth

Signature

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.