Link to home
Start Free TrialLog in
Avatar of pha1anx
pha1anxFlag for United States of America

asked on

How to: Write textarea to file ?

I have a page that is basically one form.
Each horizontal section contains a checkbox and a textarea.
I have a .py script creating the hmtl based on the assignments for the user. So it is different for each user.
And each time the user runs the .py script the page could change based on the assignments for the user.
Each assignment has a checkbox and a textarea.  
If the user checks the checkbox I want the name of that input saved.  And below each textarea is a submit button.  
I want to write to file the name of the check boxes selected, and when the submit button on any of the textareas is pressed to write all of the textareas to a file at  /home/public_html.

My guess to approaching this would be to have a javascript parse every text area then send those to a .cgi

I also thought I would point out my os is Red Hat and I'm using Mozilla/Firefox.
ASKER CERTIFIED SOLUTION
Avatar of Michel Plungjan
Michel Plungjan
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pha1anx

ASKER

Its a studio tool where people can save notes for their assignments which are parsed from another application that is used by production.
The issue was the page is dynamic and I didn't know how to get the form values when I didn't know what the names were when the page is created.  Which is why I was trying to use javascript.
I originally was using a post method and using python to write to the file.  I came up with a way to to give each form element a unique name, and the post method is working.  Simple yet complicated.
Thanks for your help!