We help IT Professionals succeed at work.

Live Updatable Table within HTML

srobia asked
Is it possible to create a table that accesses a database and make it so that all fields/rows are updatable without hitting a submit button?  So that if a user wants to edit a column they can and then move to another column within the table edit that column and have all the data updated in the database without the user clicking on something.  I know this is a 'risky' database access idea, however, is this possible?
Watch Question


you might do this with an active-x control or java-applet, but not with plain html.

You can't write to something like a database without submitting what you're trying to write.

So, no. You can't do it without a submit of some kind. It doesn't necessarily need a button, but the data MUST be submitted to be written.

And you would need to use a form, not just a table.
Top Expert 2013

Even with active-x or an applet you would still have to go accross to the server off of some user initiated trigger, unless you are going to hold a pipe open.

That does not even address trying to manange editing on the web page.  All the database would have to be sent to the browser in a pre-populated form.

You need an executable application; not a WEB page.

Top Expert 2013

BTW, you might want to deal with all the open questions you have on the site.  Your profile will make a lot of experts reluctant to help you.



I tried creating an ActiveX component, and may still do that.  A java applet would be ideal, but I don't want the users to have to download a jre.  What I was kind of hoping is that there could be a way to monitor user activity (like javascript:onFocus) to monitor each row.  So that when a user moves off of a row to update that row in the database.  Thus no submit button.  And if the user is at the last row (a blank row) and starts typing in the fields that a new blank row would appear.  I believe IE supports the DHTML addRow or something like that.
>>So that when a user moves off of a row to update that row in the database.

If you need that kind of functionality, you need a desktop application.  Maybe you come from the desktop application world...so, to let you know, you will run into many restrictions when trying to write a "program" for the web.  The web is really for displaying information, and thats it.  It has incorporated some dynamic characteristics over the years, but again, this really only applies to the presentation.  Anything dealing with the file system or similiar operations is moved off of the client to a server.  I HIGHLY recommend sticking to a submit button.


I find your comment intriguing especially with the development/support of DHTML and XML and embedded objects/applets.  In fact the capability of updating live databases with applets has been around for awhile.  And more and more sites are becoming better with their user interaction.  In doing my own research for this question I have found that I should be able to do exactly what I want without creating a submit button.  And it will be using DHTML, and ASP and so far I have only writen less than 10 lines of code.  The beauty of the web is that there are very few restrictions; just differnt/creative ways of doing things.


I believe I have programmed this to work using DHTML/javascript and ASP.  If anyone would like to find out how, please feel free to let me know.
Lets try again...

Unless you are using remote scripting, you arent going to create a direct connection to a database on a server from a client.

DHTML is merely presentation.
Javascript is only client-side code, and may be used for remote scripting or instantiating an activex component to do the work (but then you are using activex)
ASP is a server side langauge.  It cant even execute on the client.  You may load a framed page and have one frame be ASP that does the updating of the DB and "refreshes" the "static" content of the other frame.  But this is still making a roundtrip to the server for processing...it just may not be so visible to the user.
>>Javascript is only client-side code

I'll rephrase...
I assume that you are using it as your client-side scripting language.  Naturally, you can use javascript for your server-side scripts as well.

Kindly return to this open question.

community support moderator


Explore More ContentExplore courses, solutions, and other research materials related to this topic.