PDA

View Full Version : Comments


Geodesic_D
01-12-2005, 08:38 PM
Hello.

I need a script for my website, and many of the pages within. The website has Flash animations on it, and I am looking for a script that lets the person viewing the movie post a comment. They click the button, and the same page reloads, showing their script. Only problem is, I don't know how, so therefore, I have no script :(

Can someone please enlighten me? I will be grateful.

Badman3k
01-12-2005, 11:00 PM
Well firstly this would be best done in a server-side language, especially if you want to keep the comment for other viewers to see. If I'm not mistaken (and I may be, someone else may want to confirm this) JS can't use a flat-file system as JS can't write to text files or any file for that matter; therefore JS can't 'save' the data.

It's simple enough to use JS to take the user's comment entered in a form and then pass it to the same page as variables, then use the document.write to output it to the screen, however as I said above it won't save the value.

A server-side language would be able to take the data from the form, process it, save it in either a database or text file, and then refresh the page and display the saved data.