Solved

How to:  Write textarea to file ?

Posted on 2008-06-10
2
238 Views
Last Modified: 2013-12-25
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.
0
Comment
Question by:pha1anx
2 Comments
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 250 total points
ID: 21759113
Why?

Post the form and write the file using pythonI/O

http://www.penzilla.net/tutorials/python/fileio/
0
 

Author Comment

by:pha1anx
ID: 21762949
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!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Find out what you should include to make the best professional email signature for your organization.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now