...

View Full Version : output to txt file



mynameisdave145
12-18-2006, 06:21 PM
I am working on a small assignment for a class where I need to have 2 inputs (name text, and message textbox), then store this data in a "forum" type of setting.

I have this working exactly how I want it in PHP, however the server I must host it on does not allow PHP script so I am being forced to convert this over to javascript.

I want it so the user inputs their fields, then those fields are added to a (already created) txt file with | as the field seperator. From there I have no problems reading the file and outputting the data as I wish, however I have not been able to find a cross-browser solution to adding the submitted data to the txt file.

example:
name: bob
message: test message

in txt file, output to >>>

bob|test message

Any help would be greatly appreciated.

Philip M
12-18-2006, 10:33 PM
JavaScript is a client-side language and has no ability to read from or write to a file. Only a server-side language such as PHP is able to do this.

vegu
12-19-2006, 02:44 AM
could use perl if youre not allowed to use php :D

mynameisdave145
12-20-2006, 08:49 PM
JavaScript is a client-side language and has no ability to read from or write to a file. Only a server-side language such as PHP is able to do this.

Thats odd, because I can read xml files just fine using the dom, anyway i could use this technology to write as well?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum