[ic] In general: update pages
Tue, 09 Jan 2001 16:54:20 +0100
I need to ask now, b'cause I'm not sure if I'm doing it "The Right Way"
or if there is a better Interchange-solution.
I'm writing some update pages, let me use the Customer update pages as
There is a customerList.html where the user can select a customer entry
for update. When a customer is selected, the next page will be
customer.html, ant I set an action variable. Not sure if there is
built-in support for this, I've named the variable customer_action and
later changed it to mv_action. There seems to be no difference.
In customer.html, if the action variable is set to "update", the
customer will be updated, if set to "delete", it will be set to be
deleted and if the variable is not set, we have a new customer entry.
When the user submits this page, the next page will be customerUpdate,
where the real update of the database is taking place. Here we also
check for the action variable to see what has to be done.
This is all working fine, except that maybe it could be done in an
easier way with some Interchange functionality I haven't found yet.
But the real problem is that the user can jump to another page and later
come back to one of the customer entry pages, or hit the back button, or
do other things that will confuse the system. If the action variable is
left as "update", and the user leaves the customer pages and later comes
back, maybe the data will not be consistent.
I thought that I could prevent this if the page could tell where it was
called from, and if it was not from a valid page, it could delete the
action variable. But [data session referer] doesn't change during the
session, it always shows the original page.
I hope the explanation is understandable, and that this area is covered
by Interchange. Needless to say, I've been through all documentation I
could find many times without a result.
Kaare Rasmussen --Linux, spil,-- Tlf: 3816 2582
Kaki Data tshirts, merchandize Fax: 3816 2501
Howitzvej 75 Åben 14.00-18.00 Email: firstname.lastname@example.org
2000 Frederiksberg Lørdag 11.00-17.00 Web: www.suse.dk