HTML - counting the number of responses from a text file

Click For Summary
SUMMARY

This discussion focuses on tracking responses to a shirt size question on an Angelfire website, where responses are stored in a text file. The user, Jimmy, seeks a method to count the occurrences of each size (Small, Medium, Large, Extra Large) without manual counting. Two primary solutions are proposed: using a file to store the counter that updates with each response, and creating a local program to parse the input files for counting. Both solutions leverage JavaScript, which is the only scripting language permitted on Angelfire.

PREREQUISITES
  • Basic understanding of JavaScript for web scripting
  • Familiarity with text file handling and storage
  • Knowledge of file parsing techniques
  • Experience with web development on platforms like Angelfire
NEXT STEPS
  • Implement a JavaScript function to read and write to text files on Angelfire
  • Research file parsing techniques in JavaScript
  • Explore local development tools for testing JavaScript code
  • Learn about data storage options for web applications without server-side scripting
USEFUL FOR

This discussion is beneficial for web developers, particularly those using Angelfire, as well as anyone interested in implementing client-side solutions for data tracking and response counting.

jjiimmyy101
Messages
74
Reaction score
0
HTML -- counting the number of responses from a text file

Hello,

I have an angelfire website and on one of my pages I ask a simple question. What is your shirt size? There are four options: Small, Medium, Large and Extra Large. The answer is then submitted to a text file.

My problem is that I would like to be able to keep track of how many times people respond with "Small" or "Medium" or "Large" or "Extra Large" in a different text file. I've attached a sample of what kind of output I'm looking for (or anything similar to this), if my description isn't clear. I don't want to manually count the responses like I have been doing.

Is there anyway to accomplish this, keeping in mind that angelfire will not allow me to add any of my own cgi, php, asp, etc. (I can however use Javascript on angelfire, but I am not that comfortable with it).

Any suggestions would be appreciated.

Jimmy
 

Attachments

Technology news on Phys.org


#1) Use a file to store the counter.
Modify file each time request is made

#2) Do the calculation on your computer. Make a program to parse the inputs .. So just make files go through that program instead of reading them directly
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
3K
Replies
3
Views
3K
  • · Replies 17 ·
Replies
17
Views
6K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 2 ·
Replies
2
Views
5K
Replies
11
Views
7K
  • · Replies 6 ·
Replies
6
Views
4K