Hi,
I have a .pl script that I want to call from an .asp page, and have the script display HTML content (ultimately this script will perform some calculations on data received from the first .asp page).
Right now in the form tag of the .asp page I'm calling the script when the user clicks a submit button:
<FORM NAME="Geocode" ACTION=" METHOD="GET" onSubmit="return validate_data(Geocode)">
The script has the following code (I'm just trying to get something simple to run first):
#!/usr/bin/perl -w
print "Content-Type: text/html\n\n";
print "<HTML>\n";
print "<head>\n";
print "</head>\n";
print "<body>\n";
print "<H1>Test message</H1>\n";
print "<H3>test test test</H3>\n";
print "</body>\n";
print "</HTML>\n";
Instead of executing, the script just displays its entire content, showing the words print and the ;'s on the screen, etc.
I tried just using the following lines in the script:
#!/usr/bin/perl -w
print "Content-Type: text/html\n\n";
print "<H1>Test message</H1>\n";
print "<H3>test test test</H3>\n";
and in this case the script ran as an executable, without showing anything on the .asp page (just bringing up a DOS window for a second after dispalying a message did we want to open or save, etc. I chose open for this message).
I'm wanting to figure out how to call a perl script that will be able to display HTML content back to the screen, without doing either of these 2 things (just displaying everything and not running as a script, or giving a warning message before running and not affecting the browser screen)
Any ideas?
Thanks,
Ray
ps - I'm not sure if this is even the right forum to post in for running perl from an .asp page, using the CGI bin. Would that be the Perl forum, the ASP one or the CGI one?
I have a .pl script that I want to call from an .asp page, and have the script display HTML content (ultimately this script will perform some calculations on data received from the first .asp page).
Right now in the form tag of the .asp page I'm calling the script when the user clicks a submit button:
<FORM NAME="Geocode" ACTION=" METHOD="GET" onSubmit="return validate_data(Geocode)">
The script has the following code (I'm just trying to get something simple to run first):
#!/usr/bin/perl -w
print "Content-Type: text/html\n\n";
print "<HTML>\n";
print "<head>\n";
print "</head>\n";
print "<body>\n";
print "<H1>Test message</H1>\n";
print "<H3>test test test</H3>\n";
print "</body>\n";
print "</HTML>\n";
Instead of executing, the script just displays its entire content, showing the words print and the ;'s on the screen, etc.
I tried just using the following lines in the script:
#!/usr/bin/perl -w
print "Content-Type: text/html\n\n";
print "<H1>Test message</H1>\n";
print "<H3>test test test</H3>\n";
and in this case the script ran as an executable, without showing anything on the .asp page (just bringing up a DOS window for a second after dispalying a message did we want to open or save, etc. I chose open for this message).
I'm wanting to figure out how to call a perl script that will be able to display HTML content back to the screen, without doing either of these 2 things (just displaying everything and not running as a script, or giving a warning message before running and not affecting the browser screen)
Any ideas?
Thanks,
Ray
ps - I'm not sure if this is even the right forum to post in for running perl from an .asp page, using the CGI bin. Would that be the Perl forum, the ASP one or the CGI one?