On Fri, Aug 13, 2004 at 04:13:29PM +1000, Stuart Guthrie wrote:
> This is a general 'how do you do it if you do it' question about web
> application design.
> 
> Although I use struts, I'm sure a Perl or Php example would suffice.
> Even if you know of an OSS project that does this thing...
> 
> Here is the scenario.
> 
> Web Form:
> -----------------------------------------
> ORDER HEADER
> 
> Order No:   0010
> Order Date: 15/08/2004
> Customer:   ______ <LOOKUP CUSTOMER>
> Customer Name: ?
> -----------------------------------------
> 
> So the user has entered a new order date and requests the <LOOKUP
> CUSTOMER> button to search the 1,000,000 customers in the database.
> (Note, I picked a cool million deliberately to stop the 'just use a
> combo' suggestions)
> 
> The customer is found and selected. The user is returned to this form in
> exactly the same 'state' they left it. ie with the date entered as
> 15/08/2004, except their customer code is now filled in. As is the
> Customer name.

Multiple windows and JavaScript.  When the 'lookup customer' button is
clicked, a little window with the customer finder is loaded, and the user
picks their customer.  When they click the appropriate button, the window
tells it's parent what customer the user chose, and then closes itself.

It's maybe 15 lines of JS, and whatever you want for the web stuff.

Unfortunately, with such a large number of customers, it's not practical to
use a floating <DIV> to provide the box, otherwise you could fiddle it all
in JavaScript.  But with an appropriately pared-down window you should be
fine.

> - Some sort of 'stack' where the state is maintained in a 'level' of the
> stack with all the form values from the web page. The user goes off and
> searches on the next level of the 'stack' and once sorted, pulls (or is
> it pops) the stack back to the previous 'level' and re-populates the
> form.

This is possible, if you need to do everything in one window, but you'll go
grey/bald/mad/all of the above trying to make it work properly, especially
if you try to general-case it.  I know, I've looked at it.  Eventually I
figured "Xerox gave us multiple windows for a reason, dammit" and since then
my only problem has been shithouse pop-up blockers.

> - Can't be done.

Anything's possible.  It's just that anything useful is often a pain in the
arse, especially if it's related to computing.

- Matt

Attachment: signature.asc
Description: Digital signature

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to