[Tutor] Have Python Update Forms

Alan Gauld alan.gauld at btinternet.com
Thu Jun 5 23:52:09 CEST 2008


"James" <jtp at nc.rr.com> wrote

> I want to write a program that will update the 'last updated' field 
> on
> *every* item. This will require some sort of 'post' to the web 
> server

Have you considered doing it in JavaScript on the client.
You could esily do this in the onSubmit handler function.
The only snag is if the client PC is out of synch with the
server dates.

The alternative is to catch the form submission and force the
date update. If the user does manually change the date which
takes precedence? The users value or the current date?

Since this is a working app you will likely be easiest working
in the same language that the orioginal was written in!

> I'm not sure, however, how to mimic manually updating the 
> last-updated
> field.

JavaScript can do that within the browser.
Whatever language is used at the server side can do it
direct to the database.

Does that help?

Alan G




More information about the Tutor mailing list