2 Replies - 1452 Views - Last Post: 26 June 2007 - 02:44 PM

#1 etechship  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 26-June 07

Javascript: write Contents back to a file

Post icon  Posted 26 June 2007 - 01:03 PM

I have a client that whats me to redesign a site for them, so I will be using CSS. They also want me to be able to update the style sheet. I need to use javascript to re-write the file and then create a back-up file of the file that it just replaced. Then after 5 back-ups, the oldest style sheet is deleted.

Both of these files will be placed in the same folder on a unix webserver and the it will have a folder named back-up for all the 5 backed-up style sheets.

It needs to be able to work in IE and firefox (at least)

I have no clue on where to start since I have never done file editing and creation in javascript before (i have in php)

thanks
dave

Is This A Good Question/Topic? 0
  • +

Replies To: Javascript: write Contents back to a file

#2 DilutedImage  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 14
  • View blog
  • Posts: 646
  • Joined: 20-November 06

Re: Javascript: write Contents back to a file

Posted 26 June 2007 - 01:21 PM

That shouldn't be done in Javascript. Use PHP.

2
Was This Post Helpful? 0
  • +
  • -

#3 snoj  Icon User is offline

  • Married Life
  • member icon

Reputation: 84
  • View blog
  • Posts: 3,564
  • Joined: 31-March 03

Re: Javascript: write Contents back to a file

Posted 26 June 2007 - 02:44 PM

Actually it's pretty much impossible using straight javascript.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1