Re: Finally a better script!
- From: Nikos <hackeras@xxxxxxxxx>
- Date: Sat, 30 Apr 2005 01:27:49 +0300
A. Sinan Unur wrote:
$data will now contain the entire contents of /data/text/$script.txt.
Yes Sinan, that is also what i want because then a javascript follows to get the $data varibale and produce ncie effects.
$data =~ s/\n/\\n/g; $data =~ s/"/\\"/g; $data =~ tr/\cM//d;
print <<ENDOFHTML; <html><head><title></title> <script type='text/javascript'>
var textToShow = "$data";
{snip]I was wondering if there is a way to take out the js snippet from my index.pl but still pass the value of $data to that .js to produce the nice effects.....
Also i have to take out the backslash and " symbols or otherwise the javascript part wont work correctly since $data is enclosed to double quotes.
Is there soem better way to do this? .
- Follow-Ups:
- Re: Finally a better script!
- From: Fabian Pilkowski
- Re: Finally a better script!
- References:
- Finally a better script!
- From: Nikos
- Re: Finally a better script!
- From: A. Sinan Unur
- Finally a better script!
- Prev by Date: Re: Finally a better script!
- Next by Date: Re: CGI Post not passing values properly
- Previous by thread: Re: Finally a better script!
- Next by thread: Re: Finally a better script!
- Index(es):