What does the source of the page say? Everything looks correct in your perl, but it sounds as if the problems are client side which would indicate that whatever is in mytext.dat is not correct javascript.

Verify that the source matches the mytext.dat code, and then double check that that code actually executes properly in javascript in the page normally.

http://danconia.org

[EMAIL PROTECTED] wrote:
okay here is the thing, i have found this really neat piece of code

when I add

<SCRIPT SRC="http://www.mydomain.com/cgi-bin/test.cgi";></SCRIPT>


and test.cgi has the following code

#!/usr/bin/perl

print "Content-type: application/x-javascript\n"; print "Pragma: no-cache\n\n";

print "document.writeln(\"test\");";

#######end of script.


it prints test on the web page where i inserted the line

however

when i change the script to

#!/usr/bin/perl



print "Content-type: application/x-javascript\n"; print "Pragma: no-cache\n\n";

{
open LOG,"mytext.dat"; @log_lines = <LOG>;
close LOG;

foreach $line (@log_lines){
print "document.writeln(\"$line\");";
}
}
########end script


the page loads but it says it has errors


has anybody played with these functions or know where i can find documentation on it.?

thanks Ambrose


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to