S
stahl.karl
I have a CGI/Perl program that returns a string output. Is it possible
to get this into a Javascript variable, where the name of the variable
is defined in the Javascript and not in the Perl code? For example, it
seems that the following should work, but it doesn't appear to. Is
this valid code?
CGI code --- get_string.pl ------
print "Content-type: text/plain\n\n";
print "ahoy matey";
-------------------------------------------
Javascript/html ------------------
<script type="text/javascript">
var mystring = eval('http://blabla/cgi-bin/get_string.pl');
document.write(mystring);
Thanks for your help!
to get this into a Javascript variable, where the name of the variable
is defined in the Javascript and not in the Perl code? For example, it
seems that the following should work, but it doesn't appear to. Is
this valid code?
CGI code --- get_string.pl ------
print "Content-type: text/plain\n\n";
print "ahoy matey";
-------------------------------------------
Javascript/html ------------------
<script type="text/javascript">
var mystring = eval('http://blabla/cgi-bin/get_string.pl');
document.write(mystring);
Thanks for your help!