Here is how I do it;

#!/usr/local/bin/perl -w
use CGI;

print header();
print "<head>\n",
      "   <title>test script</title>\n";
print <<DONE;
<SCRIPT LANGUAGE="JavaScript">
   alert('test');
</SCRIPT>
DONE
print "</head>\n";

cheers,


Glenn

Glenn Tillema                  [EMAIL PROTECTED]
ADC Telecommunications, Inc.
PO Box 1101, MS 508
Minneapolis, MN  55440-1101
Learn about ADC - The Broadband Company - www.adc.com

>   ----- Original Message ----- 
>   From: [EMAIL PROTECTED] 
>   To: CGI Beginners 
>   Sent: Tuesday, June 12, 2001 4:41 PM
>   Subject: javascript within print "<<tag"
> 
> 
>   i have a script that generates html. i would like to put 
> some javascript
>   in the <head></head> tags which is being generated, but escaping the
>   javascript is a nightmare.
>   does the print "<<tag" allow you to enter all this tedious 
> code without
>   escaping?
>   if not, do i have another choice to get around this?
> 
>   thanks -cjm
> 
> 

Reply via email to