Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Perl (http://www.velocityreviews.com/forums/f17-perl.html)
-   -   Perl CGI (http://www.velocityreviews.com/forums/t24758-perl-cgi.html)

Hari 01-19-2004 09:36 AM

Perl CGI
 
Hi,

I am a newbie to Perl CGI. I am developing an application with a web
front end and C language module at the backend. The interface between
them is a UDP socket. I am using Perl to construct the HTML pages.
Here is what I do.

1) Show a web page and accept values from the web-user.
2) When the User presses "Submit", I construct a message and send it
across the UDP socket to the backend.
3) I wait for the response from the backend. If the response is an
error (could be because of wrong values entered by the user), I clean
up the existing page and show a new page displaying an appropriate
error message.
4) When I try to show the error html page, the contents always get
appended to the existing html page.
5) How can I clear a html page and display a new one? I tried print
$query->end_html and followed it up with a $query->start_html. Didnt
work.

Please help me. Thanks.

nobull@mail.com 01-20-2004 01:18 PM

Re: Perl CGI
 
haribalram@yahoo.com (Hari) wrote in message news:<9fb02734.0401190136.736a7dee@posting.google. com>...
> I am a newbie to Perl CGI.


When learning several new things at once (HTTP, HTML, CGI, Perl) it
may help to learn them one at a time.

Your question has nothing to do with Perl or CGI.

Your question has to do with HTML and the HTTP request cycle.

> 4) When I try to show the error html page, the contents always get
> appended to the existing html page.
> 5) How can I clear a html page and display a new one? I tried print
> $query->end_html and followed it up with a $query->start_html. Didnt
> work.


A single HTTP request gets a single HTTP resoponse. (Ignoring
server-push, which I don't understand).

A single HTTP response has a single body (e.g. and HTML document).

There is no way in HTML to clear a document or cause an immediate
redirect without resorting to client-side scripting.

This newsgroup does not exist (see FAQ). Please do not start threads
here.


All times are GMT. The time now is 04:27 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57