View Full Version : HTML/Java form to local CSV file

06-16-2010, 06:11 AM
Hello all!

As you will notice I don't have any experience with programming and I need what seems like a simple form that I would like to be saved to CSV. I am restricted to using Java and HTML/CSS and the file will be saved to a network computer where all users will have full access. This form needs to be a single file and the saved csv file needs to be saved in a ďdataĒ folder where the form is located.

I donít mind reading and trying to learn how to make this happen but I just donít know where to go or what to learn. Iím guessing this will need to be done in Java as I donít think HTML/CSS can save the completed form to CSV. If you know of any resources I can read that will target the specific task I have described please, please let me know. I am also very open to help if anyone would like to give me some tips.

To say it again... I'm not asking for a free handout for a project that I am working on. I don't mind learning..... But on the other hand I won't turn a handout down ;)

For now I need to prove functionality that this can be done. I donít need anything to look spectacular, just functional.

Here is what I have in mind for what Iím trying to do:

Feedback Form

<FORM action="test.com" method="post">
<fieldset class="contact_fieldset" style= "border-style: none;">
<table class="contact_table" border=0 cellspacing=0 cellpadding=0 >
<td class="department_td"></td>
<td><input type="radio" name="group1" value="department1"> Department 1
<input type="radio" name="group1" value="department2" checked>Department 2
<input type="radio" name="group1" value="department3"> Department 3
<td class="email_td">Your Email:</td>
<td><input type=text name=email_address size=25></td>
<td class="ID_td">Your ID:</td>
<option name="employee1" value="employee11111">11111</option>
<option name="employee2" value="employee22222">22222</option>
<option name="employee3" value="employee33333">33333</option>
<td class="comment_td">Comments:</td>
<td><textarea name=commentarea rows="4" cols="25"></TEXTAREA></td>
<input type="button" name="Submit" value="Submit">

The CSV needs to look like the example below. If the CSV file is not found the file should then be created. If there is a CSV found then the CSV should be updated (new row) with the new information.

I am thinking the first line in the CSV file would look like:

| 6/15/10 20:38 | Department 1 | test@test.com | 11111 | This is a test |

Thank you all so much for any help!


Philip M
06-16-2010, 08:30 AM
You should be aware that Java and Javascript are entirely different programming languages, in spite of the confusingly similar names.

JavaScript is purely a client-side language, and has no capability to write to a file (except a cookie), communicate with the server, access a database, the client's operating system or the Windows registry, or alter the default behaviour of the browser.

You will need to use a server-side language such as PHP.

Quizmaster: A biped is a creature that walks on how many feet?
Contestant: Five.