Editable Table/Grid

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
mhstabler
Forum Newbie
Posts: 4
Joined: Tue Jul 20, 2004 10:38 am

Editable Table/Grid

Post by mhstabler »

New to php, html and web apps. Experience in visual programming.

I'm not sure where to look. But php seemed a good start. I'd like to make a order entry form/screen that the user can fill in a table/grid. Actually tab through every cell add/change/delete data (product #,quantity, etc) and also validate the info on the tab to the next cell. OK, I'd be happy to just to edit cells in a table.

I'm guessing I need some open source or 3rd party product. Hopefully someone can get this noobie pointed in the right direction.

I am currently running Apache, php on a linux OS ODBC'ing to a AS/400 db2 server. The net-admin almost has php5 compiled to use DB2 commands(5-days!). I'd like to have something to show our staff that php is easier to learn then java. Everywhere I look, web apps are displaying data in a table and making the user select the row, go to another page to add/change/delete. I'd like to cut out the excess hoop jumping. Since the data is right there in the table, why not add/change/delete right there.

Thanks, in advance.
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

PHP is only done server side, so you cannot change the data in the database unless you send it back to the server - I.e inorder to edit data you have to - get the current data - edit it - send the data back. This would also be true with any other programming language except that it could maybe submit the data in the background without you knowing that its really happening.

PHP would be fine to do it in though and confirmation screens are always good for users as they know that what they have done has caused a result and they can see if its the correct result. As for checking the data, you can use javascript to do this client-side so that you dont post the form only to be told that you didnt fill in a field or that the email address is invalid.
mhstabler
Forum Newbie
Posts: 4
Joined: Tue Jul 20, 2004 10:38 am

Post by mhstabler »

Thanks kettle_drum,

As for the actual table/grid editable object. Can HTML tables handle it? I was told that HMTL table can only display data not edit. Is there a table/grid visual object simular to a HTML table that can do this or do I need something. As an example, think of putting a spreadsheet in the browser and having the full range of cells to tab and edit. Also build in methods to know the max row count, if a row has been changed. That sort of thing.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

mix a HTML table with form elements.
mhstabler
Forum Newbie
Posts: 4
Joined: Tue Jul 20, 2004 10:38 am

Post by mhstabler »

You mean a slew of input fields?

field11,field12,field13,field14,field15
field21,field22,field23,field24,field25
filed31,field32,field33,field34,field35

??

Please explain I'm new.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

basically, yes, you'd have an input/select/whatever field for each element you wish to edit.
mhstabler
Forum Newbie
Posts: 4
Joined: Tue Jul 20, 2004 10:38 am

Post by mhstabler »

Thanks feyd,

I was hoping for something a little more elegant and robust. Maybe and array of fields. At least I know there is an answer in HTML. And PHP can handle the DB side. Thanks for the quick responses. Much more helpful the phpfreaks.

Any other web-friendly languages allow you to build more complex visual objects without having a client side footprint?
Post Reply