Perl CGI

Discussion in 'Perl' started by Hari, Jan 19, 2004.

  1. Hari

    Hari Guest

    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.
     
    Hari, Jan 19, 2004
    #1
    1. Advertising

  2. Hari

    Guest

    (Hari) wrote in message news:<>...
    > 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.
     
    , Jan 20, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jürgen Exner

    Re: CGI Perl "use CGI" statement fail

    Jürgen Exner, Jul 31, 2003, in forum: Perl
    Replies:
    0
    Views:
    1,541
    Jürgen Exner
    Jul 31, 2003
  2. praba kar

    Python-cgi or Perl-cgi script doubt

    praba kar, Jul 30, 2005, in forum: Python
    Replies:
    1
    Views:
    745
    Michael Sparks
    Jul 30, 2005
  3. excord80
    Replies:
    17
    Views:
    803
    J Kenneth King
    Jan 29, 2009
  4. shumsta
    Replies:
    1
    Views:
    292
    Fabian Pilkowski
    Jul 22, 2005
  5. kath
    Replies:
    4
    Views:
    736
    J. Gleixner
    Apr 9, 2007
Loading...

Share This Page