Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Requesting user interaction

Status
Not open for further replies.

Diancecht

Programmer
Jan 8, 2004
4,042
ES
Hi all.

I'm not sure this is the correct forum to post this question. If not, please tell me and I'd try to find one more appropiate.

My question has to be with requesting user interaction in the middle of the process of a request. Imagine you have a site hosting a web application: that application has some options that executes some server-side process and show the results.

At some point of the server side process, an authorization is request, and the user needs to enter some credentials. After the credentials are entered, the process has to continue in the same point. This is my problem rigth now

I was thinking on how to do this and I think this is a common problem that *must* have a lot of discussed and proved sollutions, but my searches weren't lucky so far.

So, before starting reinventing the wheel, does anyone know about some resources about this where I can document myself to find an ellegant sollution?

Cheers,
Dian
 
Hi Foamcow, thanks for the reply.

Due to the nature of the server side process, you cannot know when the credentials will be needed, so no way of requesting them at the beginning or splitting the process.

Furthermore, there are a wide range of processes and the mechanism will be shared by all. This is not a problem I think, I'm just lookig for a communication schema.

Cheers,
Dian
 
You could ask this on the CGI forum, forum452 , but I'll have a go.

The problem is that programming the back-end on a web site isn't like regular UI programming. If you're writing some code that's going to run client-side you can do this:

Get input from user
process it
Get some more input
process some more
etc...

Server-side programs can only really do this:

Get input from user
process it
Output results

So if you want to do a multi-step process, you have to save your interim results somehow, output the second input request as the "results", and have that form fire a new program that is able to pick up where the last one left off.

The term you need to Google for is "saving state" together with whatever language you're using, e.g. .

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Hi Chris, thanks for the reply.

I'll take a look.

Cheers,
Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top