...

View Full Version : Editing Table Row Values ?



Mad_T
07-17-2012, 10:51 AM
Hi
I'm using basic HTML to create a table. 8 columns wide and multiple rows.
Due to it's size it can take several seconds to get the data and present it on screen.

When the data is displayed I would like to be able to double click on a row and have that row editable.

Each row will need to be a form as there are hidden values I need to submit as well as the cell data.

When I click away from the row, I want the values passing back to javascript so I can use PHP to save them.

1. is this possible ?
2. any ideas ?

I've found a couple of scripts, but nothing that is similar to this.
Thanks

sunfighter
07-17-2012, 07:16 PM
Yes this is possible. Put 'edit' button in 9th cell for every row. use onclick to call javascript. Change the 'edit' button into a submit or a finished editing or what ever name button to send the new info off to your DB. So
When I click away from the row, changed to submit the row. and
I want the values passing back to javascript so I can use PHP to save them. look up and use AJAX for this.


Each row will need to be a form as there are hidden values I need to submit as well as the cell data. You really don't need forms for this. Your server side script will know what row was edited and know what those hidden values are so a form is not needed.

Study this for many ways to change the DOM http://www.w3schools.com/js/js_ex_dom.asp

Personally I would use something like a shadow box LIKE div to display the row for editing.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum