At 14:42 20.11.2002, Larry Brown spoke out and said:
--------------------[snip]--------------------
>Does anyone know of a method to pause during the processing of a script to
>prompt a user for information and then incorporate the user's response for
>the remainder of the script?
--------------------[snip]-------------------- 

This seems to be a very common misunderstanding of how the Web works.

First as an answer to your question, you cannot do it, no way.

Next, assume you're a manufacturer and send some goods to a customer,
wrapped in a parcel. What you want to achieve is: when the customer
eventually receives the parcel, you ask him if the address label is printed
correctly. If he answers "yes" you give him a scissor to open it, if not
you hand him another - now corrected - label.

It's clear that this can't be done - you're at your office, and your
customer is at his location. While clear in "real world" terms, this is
often misunderstood for internet applications.

In the example above the client browser (better: the web form) is you, the
manufacturer. The customer receiving the goods is the server application.
The form is displayed and filled out at the users browser, clicking on
"submit" transmits the whole form content to the server for processing.
>From this moment the client's out of the game.

---------------------
Ok, but I have a solution.

If you are able to interrupt your processing to ask the user some question,
you can view your process as two parts - let's name them "PreProcess" and
"PostProcess". When the user submits the form, the server starts the
"PreProcess" action. At the end of the "PreProcess" action the current data
status gets saved to session persistent storage, and another form is sent
to the browser to answer your specific question.

Eventually the user answers your question and submits this (second) form.
Now the server application is fired up again, rereads the session data, and
continues with "PostProcess" as you like.

Everything clear?


-- 
   >O Ernest E. Vogelsinger 
   (\) ICQ #13394035 
    ^ http://www.vogelsinger.at/

Reply via email to