cancel
Showing results for 
Search instead for 
Did you mean: 

Web Scripts / Server Side Javascript

mcook
Champ in-the-making
Champ in-the-making
I have a few questions concerning these scripts.

We have some documents that have become corrupted, and we need to repair them and any new ones that arise.  We know all the files that are corrupted, so I thought it would be optimal to make a list of the files to be batched fixed in a web script.  Is it possible to have a webscript open a plain text file? server side and/or client side?

Also, is it possible to setup a form to give parameters to a web script?  For instance, we have some files that have properties that need a change (because someone made a mistake with data input).  How difficult would it be to make a form that would show the current values, allow them to be changed, and pass them as parameters to a web script?

I have done some googling without much luck so any input would greatly be appreciated.

Regards
1 REPLY 1

mrogers
Star Contributor
Star Contributor
->We have some documents that have become corrupted, and we need to repair them and any new ones that arise. We know all the files that are corrupted, so I thought it would be optimal to make a list of the files to be batched fixed in a web script. Is it possible to have a webscript open a plain text file? server side and/or client side?

You can read the content of a file on the server side or client side through either Java/JavaScript/HTTP/FTP.

->Also, is it possible to setup a form to give parameters to a web script? For instance, we have some files that have properties that need a change (because someone made a mistake with data input). How difficult would it be to make a form that would show the current values, allow them to be changed, and pass them as parameters to a web script?

There's possibly two web scripts involved here the first to read and display your properties.   The second to store the values of your modified properties.   You will need to work out what format of data to read your properties such as JSON, XML or HTML.   And your second web script will need to accept a response and apply the changes.   You will also probably find that the neccessary web scripts to read properties or contents and set properties and contents already exist.