CGI Using Delphi..

How can i reply to the Request i recieved with the same page+its contens(i mean someone submit a form and there is an error in his data as duplicate login name so how to send a response with the same page and his previous information he use to enter,to avoid reentering information.
omeralfarougAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

omeralfarougAuthor Commented:
Listening:-)
0
omeralfarougAuthor Commented:
i'am using CGI Stand Alone Executable,TWebmodule,so which methods i can use and how?.
0
omeralfarougAuthor Commented:
in another meaning i need the function or procedure which can do the same function of the Back Arrow in the web Browser(Explorer,Netscape...etc).
0
Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

geobulCommented:
Hi,

In this case I send an 'error' page (plain text, no links or buttons), where I describe what kind of error it is and ask the user to press BACK button himself.

-----------
<HTML>
<HEAD><TITLE>ERROR</TITLE></HEAD>
<BODY>
<B>Error !</B> Description follows:<HR>
Bla bla<HR>
Press <STRONG>BACK</STRONG> to continue !
</BODY>
</HTML>
---------------
or you can use a button on the page above this way:
<INPUT TYPE=submit NAME="OKBtn" VALUE="OK" OnClick="history.go(-1);return true;">

Pressing the button will go back.

Regards, Geo

PS: You asked this question more than once. Please leave one and delete the others.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
omeralfarougAuthor Commented:
hi geobul,
let me try and i will confirm u.
0
omeralfarougAuthor Commented:
thanks goebul,
but would u tell me how can i do it without sending button to the user as to press it,i mean in the follwing code of delphi using CGI:
Response.content:=?
is it possible!
0
geobulCommented:
Hi,
There is a way to send nothing. I mean if you find an error, you can tell the server that there is no response and the client browser will stay on the page of the request.

{ some web action }
.....
{ Here you already know that there is an error }
  Response.StatusCode := 204;
  Handled := True;
  Response.SendResponse;
......

That's all. Setting status code to 204 means that there is NO CONTENT.

I hope that this is clear.

Regards, Geo
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.