Thread: Unterminated String constant
Results 1 to 1 of 1
Related
-
Opening a file to a constant "size". Forum: Javascript Forum
Replies: 2 -
parsing string Forum: CGI Perl Forum
Replies: 1 -
Unterminated String Constant Forum: Javascript Forum
Replies: 0 -
Array to string Forum: PHP Forum
Replies: 3 -
Can I get a variable name as a string? Forum: PHP Forum
Replies: 2
-
03-08-2004, 02:39 PM #1
Unterminated String constant
CGI source:
<script>
text = new Array($size);
EOM
for ($i=0; $i<$size; $i++){
$line=@lines[$i];
$line=~ s/\n//g;
$no++;
print <<EOF;
text[$no] ='$line'
EOF
}
print <<EOM;
document.write ("<center><marquee scrollamount='1' direction= 'up' height='100'>");
for (i=1;i<$size;i++){
document.write (text[i] + "<br>");
}
document.write ("</marquee></center>")
</script>
IE parsed HTML:
<script>
text = new Array(12);
text[1] ='2004年03月07日 12:33:58 gerendell 挑战 coolman 败北 '
text[2] ='2004年03月07日 12:33:37 gerendell 挑战 coolman 败北 '
text[3] ='2004年03月07日 12:03:07 gerendell 挑战 coolman 败北 '
text[4] ='2004年03月07日 12:01:25 coolman 挑战 gerendell 战胜 '
text[5] ='2004年03月07日 12:00:55 coolman 挑战 gerendell 战胜 '
text[6] ='2004年03月07日 11:59:24 coolman 挑战 gerendell 败北 '
text[7] ='2004年03月07日 11:58:57 coolman 挑战 gerendell 战胜 '
text[8] ='2004年03月07日 11:58:20 coolman 挑战 gerendell 战胜 '
text[9] ='2004年03月07日 11:57:03 coolman 挑战 gerendell 战胜 '
text[10] ='2004年03月07日 11:52:30 coolman 挑战 gerendell 败北 '
text[11] ='
'
text[12] =' '
document.write ("<center><marquee scrollamount='1' direction= 'up' height='100'>");
for (i=1;i<12;i++){
document.write (text[i] + "<br>");
}
document.write ("</marquee></center>")
</script>
And i get the unterminayed string constant error.
How do i fix the cgi part?
thx!
Cloudjiffy- PaaS for Developers
10-05-2020, 12:30 AM in Web Hosting Forum