dynamic tables

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
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,


Re: dynamic tables

decoy@system102.com wrote:

Quoted text here. Click to load it

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.

Quoted text here. Click to load it

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?


Re: dynamic tables

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.

Re: dynamic tables

decoy@system102.com wrote:

Quoted text here. Click to load 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

Have fun!

Re: dynamic tables

cheers man, you've been a great help!

Site Timeline