View Full Version : question over perl/cgi

03-03-2010, 08:33 PM
I'm using perl and cgi module for creating web pages, but now I'd like to modify web page and not create new pages.

For example when I press submit button in my page, then I want show the output string "Operation completed" in my same page without create an other.

How can I solve this problem?

03-03-2010, 10:22 PM
You need either to show some code or explain in more detail what you mean. It sounds like you want to submit a form to a processing script and when that has finished its process, you want it to output 'Operation completed'.

If that is so; we need to see the code you have made to see why it isn't doing what you want it to.


03-14-2010, 08:20 AM
If I understand you correctly, you don't even want to refresh the page, you just want it to print out the response. In which case, what you are trying to is not possible using server side scripts. What happens is, when your cgi is compiled, it generates html. After that, the server is done and the client takes over.

03-16-2010, 07:27 PM
How about AJAX?



03-18-2010, 05:04 PM
In this moment, rather than Ajax I prefer "Old School" with iframe usage.
I my page with this iframe declaration:

<iframe src="registerform" width="100%" height="600" frameborder="no" scrolling="no">
iframe source is registerform.html page.

I have also registration.cgi perl script that process form data.
I want to know how can replace old iframe with registration data with new iframe with confirm for registration.


03-18-2010, 05:55 PM
An iframe changes little about what has already been suggested. If you click a button in the page that is within the iframe, it will load a new page into the iframe by default.

If you tell it to load into the parent page, it will do that but, unless you use AJAX or JS, there will always be the requirement to load a new page.