This example in written into the body...
# Ship to checkbox
if ($Cust_Data{ship_to_key} != "") {
print <<SCRIPT2B;
document.customer_form.ship_to_diff.checked=true;
document.customer_form.ship_to_init.value='on';
SCRIPT2B
}
This is "included" for form execution ...
my $cript=<<ENDSCRIPT
function test {
}
ENDSCRIPT
or
my $cript = &IncludeScript('test.js'); # add "canned" script from a library
sub IncludeScript {
# use dienice;
my ($cript)[EMAIL PROTECTED];
open SCRIPT_SRC, "Library/JavaScripts/$cript"
or dienice('Open($cript) - Failed');
my $JSCRIPT='';
while (<SCRIPT_SRC>) {
$JSCRIPT .= $_;
}
close SCRIPT_SRC;
return $JSCRIPT;
}
1;
print $q->start_html(-title=>$title,
-script=>$cript);
hope this helps
jwm
-----Original Message-----
From: sasi pillutla [mailto:[EMAIL PROTECTED]
Sent: May 28, 2003 09:38
To: [EMAIL PROTECTED]
Subject: Help Required [HOW DO I INCLUDE MY JAVA SCRIPT files in my PERL
SCRIPT FILE]
how do i include JS files in my ".pl" files
thanks in advance
ur
sasi
__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com