Solved

How to:  Write textarea to file ?

Posted on 2008-06-10
2
237 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
Comment Utility
Why?

Post the form and write the file using pythonI/O

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

Author Comment

by:pha1anx
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

762 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

12 Experts available now in Live!

Get 1:1 Help Now