Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2008
    Location
    Portland, OR
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question HTML/Java form to local CSV file

    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:

    Code:
    <HTML>
    <TITLE>
    Feedback Form
    </TITLE>
    <HEAD>
    </HEAD>
    <Center>
    
     <FORM action="test.com" method="post">
    <fieldset class="contact_fieldset" style= "border-style: none;">
    <table class="contact_table" border=0 cellspacing=0 cellpadding=0 >
     <tr>
     </tr>
     <tr>
        <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>
     </tr>
     <tr>
        <td class="email_td">Your Email:</td>
        <td><input type=text name=email_address size=25></td>
     </tr>
     <tr>
        <td class="ID_td">Your ID:</td>
        <td><select>
            <option name="employee1" value="employee11111">11111</option>
            <option name="employee2" value="employee22222">22222</option>
            <option name="employee3" value="employee33333">33333</option>
            </select> 
        </td>
     </tr>
     <tr>
        <td class="comment_td">Comments:</td>
        <td><textarea name=commentarea rows="4" cols="25"></TEXTAREA></td>
     </tr>
    </table>
    </fieldset>
    <input type="button" name="Submit" value="Submit">
    </form>
    </center>
    </body>
    </html>
    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!

    -Rob

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,017
    Thanks
    203
    Thanked 2,538 Times in 2,516 Posts
    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.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •