dynamic tables

Discussion in 'HTML' started by decoy@system102.com, Apr 8, 2006.

  1. Guest

    Hi everyone,
    Does anybody know how I can achieve the following?

    I have a table that displays some information in plain text, on each
    row I have an edit button that will allow the user to enter new values
    for this row (basically display the same information as before but in
    text boxes with the edit button replaced with a confirm button). When
    the user has updated I would like to go back to the plain text view
    with the new values.

    Now comes the hard part ;)

    I want to do all of this clientside, allowing the user to click on a
    save button when they have editting that will re-enter all of the
    information back to the DB.

    I've looked into the following but it's not really what I intended:
    http://www.scheinwelt.at/~norbertf/devel/websheet/

    Sample code would be greatly appreciated!

    Thanks in advance,

    Stu.
    , Apr 8, 2006
    #1
    1. Advertising

  2. Jim Higson Guest

    wrote:

    > Hi everyone,
    > Does anybody know how I can achieve the following?
    >
    > I have a table that displays some information in plain text, on each
    > row I have an edit button that will allow the user to enter new values
    > for this row (basically display the same information as before but in
    > text boxes with the edit button replaced with a confirm button). When
    > the user has updated I would like to go back to the plain text view
    > with the new values.
    >
    > Now comes the hard part ;)
    >
    > I want to do all of this clientside, allowing the user to click on a
    > save button when they have editting that will re-enter all of the
    > information back to the DB.


    It can't be done completely client-side, you'd still need a thin server
    script to listen to and validate information from client and enter it into
    the database. This could be done without reloading the client's page
    though, using XmlHttp.

    > I've looked into the following but it's not really what I intended:
    > http://www.scheinwelt.at/~norbertf/devel/websheet/
    >
    > Sample code would be greatly appreciated!


    What you want can be done with Javascript + DOM without too much fuss, but I
    wouldn't recomend it as a first project in those technologies. Is system102
    a web design company? In which case, maybe you'd be better off outsourcing
    the work?

    --
    Jim
    Jim Higson, Apr 8, 2006
    #2
    1. Advertising

  3. Guest

    Thanks for the response.

    Sadly outsourcing is not an option, so I'll have a go at the JS+DOM
    solution (it sounds like fun :)

    I guess if I create an invisible row with a text box in, then when a
    user wants to edit the contents of a row the plain text row becomes
    invisible and the textbox one becomes visible.
    Then somehow the changes will be reflected back to the plain text one
    when the user saves it.
    , Apr 8, 2006
    #3
  4. Jim Higson Guest

    wrote:

    > Thanks for the response.
    >
    > Sadly outsourcing is not an option, so I'll have a go at the JS+DOM
    > solution (it sounds like fun :)
    >
    > I guess if I create an invisible row with a text box in, then when a
    > user wants to edit the contents of a row the plain text row becomes
    > invisible and the textbox one becomes visible.
    > Then somehow the changes will be reflected back to the plain text one
    > when the user saves it.


    You could, but I would just scan the row and replace all the text nodes with
    input elements showing the old text node's content.

    Javascript: the Definitive Guide (O'Reilly) is a good book on stuff like
    this.

    Have fun!
    --
    Jim
    Jim Higson, Apr 8, 2006
    #4
  5. Guest

    cheers man, you've been a great help!
    , Apr 8, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Carlos Gomez

    Dynamic Tables

    Carlos Gomez, Jan 29, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    377
    Do Quyet Tien
    Jan 29, 2004
  2. Carlos Gomez

    Dynamic Tables

    Carlos Gomez, Feb 1, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    675
    Marshal Antony
    Feb 1, 2004
  3. Peter Bassett
    Replies:
    3
    Views:
    917
    Augustus
    Aug 15, 2003
  4. Otuatail

    Tables within tables

    Otuatail, Jul 31, 2004, in forum: HTML
    Replies:
    7
    Views:
    486
  5. Chris Brat
    Replies:
    5
    Views:
    689
    =?iso-8859-1?q?Luis_M._Gonz=E1lez?=
    Aug 22, 2006
Loading...

Share This Page