Perl CGI Query

Hi All,

This is quite a high level question so I appologise as if it sounds a bit woolly!

I'm running a script via apache's cgi-bin that calls another Perl script (from a browser):

http://192.168.000.000/cgi-bin/run_script.pl?SCRIPT=test.pl&text=RANDOM+TEXT&INPUT1=444444444444

This script parses some output (putting everything into a hash) from a UNIX command and populates a pre-formatted HTML template file - using the following command:

$html =~ s/%(\w+)%/$enabled_yn{$1}/g;

But there is more information returned by the original query - how do I enable my script so that it has a NEXT button so that I can get it to display the next HTML template file?

Or, could I pause the output of the original script so that it waits for user input from the browser before showing the next portion of information?

Am I asking too much from the Perl by itself should I be looking at some JavaScript (maybe AJAX'd) to do this?

Many thanks,

pondlife.
www.AddAnImage.com

Why not make that part of the HTML template? If there's another page, replace it with the "next" link, otherwise, make it blank?

Hi,

I can parse an output the whole of the information returned into one HTML file and print that but it's very long so it would be great to have the page(s) split - like with a NEXT prompt... But how would I split it?

What would the HTML link look like?
For added complexity the output comes between a header and footer that are called separately...

(sorry this is becoming an HTML question rather than a Perl one).

Thanks again,

pondlife.
www.AddAnImage.com

I see what you're getting at. Use a different template for each page, maybye in an array; the page number would determine which template gets used. The link would look like

<a href="http://192.168.000.000/cgi-bin/run_script.pl?SCRIPT=test.pl&page=2&text=RANDOM+TEXT&INPUT1=444444444444">next</a>

I don't know what that would look like in your templates.

If my understanding of your question is right, It is possible for you to handle it with sessions, say CGI::Session. Data may be populated in the session once, and then those data may be displayed in chunks from a subsequent sequence of pages.

I hope I didn't misunderstand your question, but I really do not know the exact situation you are in. Also, having a script name directly embedded as a parameter in a URL is a severe security risk as it will open the possibility to execute any script right from a Web browser!