in reply to Re: Re: How do i refresh a page from the perl script.
in thread How do i refresh a page from the perl script.

The answer to the direct question is "no", and that has more to do with the way HTTP and web browsers work than Perl. In general, a web server doesn't normally send just part of a page to replace an existing page. There are ways to do this with JavaScript and other client-side programs as well as with multipart transfers. That's probably not what you want.

A simpler explanation is to generate the HTML page within the CGI program. You'll send the whole thing to the browser, but you'll have the opportunity to substitute in your preferred parameters. If you follow this road, you might end up coding the whole thing as a Perl program, integrating the static HTML page into the program or as a template or something. If there are no parameters passed (that is, the user pressed no buttons, just loaded the page for the first time), send a blank form. If the user pressed a button, perform the appropriate action.

Doing much of anything else makes a lot of assumptions about the web browser. In some cases, you can get away with that.

  • Comment on Re: Re: Re: How do i refresh a page from the perl script.