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 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Sep 2007
    Posts
    2
    Thanks
    3
    Thanked 0 Times in 0 Posts

    How can I permanently update a web table through a form?

    Hello:

    I want to have a form on my web site that will permanently update a table when submitted. An simple example of the type of form I would have is below.

    Name
    <select name="Name">
    <option selected>
    <option>Darrin
    <option>Paul
    <option>Scott
    </select>
    <p>
    Hair color<br>
    <input type="radio" name="hair" value="one"> Brown <br>
    <input type="radio" name="hair" value="two"> Blond <br>
    <input type="radio" name="hair" value="three"> Other<br>
    <p>
    Eye color<br>
    <input type="radio" name="eye" value="one"> Blue <br>
    <input type="radio" name="eye" value="two"> Brown <br>
    <input type="radio" name="eye" value="three"> Green <br>
    <input type="radio" name="eye" value="four"> Other <br>


    After making choices and submitting, I would want the below table to be updated. Note the bold items - these are the ones I would want updated.

    <table border="1">
    <tr>
    <td><b>Name</b></td>
    <td><b>Hair Color</b></td>
    <td><b>Eye Color</b></td>
    </tr>
    <tr>
    <td>Darrin</td>
    <td>Brown</td>
    <td>Brown</td>
    </tr>
    <tr>
    <td>Paul</td>
    <td>Blue</td>
    <td>Brown</td>
    </tr>
    <tr>
    <td>Scott</td>
    <td>Brown</td>
    <td>Blue</td>
    </tr>
    </table>


    Any help/suggestions will be greatly appreciated!

    Scott

  • #2
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    By permanently, do you mean the html file itself on the server?
    If so, you need a server-side script; you can't do that with client-side script or just html/css.

    Or did you mean just the display to the person using it; i.e. the one client browser? If that was it, you can do it with javascript.

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • Users who have thanked nikkiH for this post:

    umich1967 (09-14-2007)

  • #3
    New to the CF scene
    Join Date
    Sep 2007
    Posts
    2
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Yes, on the html file itself. Do you have a suggestion as to where I could look for guidance on server-side scripts? I have a moderate amount of coding knowledge, but in a limited number of areas.

    Thanks for your time!

    Scott

  • #4
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    CodingForums has sections for all these.

    Frank

    http://www.codingforums.com/forumdis...daysprune=&f=4
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.

  • Users who have thanked effpeetee for this post:

    umich1967 (09-14-2007)

  • #5
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    Quote Originally Posted by umich1967 View Post
    Yes, on the html file itself. Do you have a suggestion as to where I could look for guidance on server-side scripts? I have a moderate amount of coding knowledge, but in a limited number of areas.

    Thanks for your time!

    Scott
    Lots of places, including this board.
    You need to choose a language / platform based on what the server supports. ASP/ASP.NET for Windows or PHP for *nix would be the popular choices.

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • Users who have thanked nikkiH for this post:

    umich1967 (09-14-2007)


  •  

    Posting Permissions

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