473,486 Members | 2,401 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

PHP Error

Im getting an error:

Error: unterminated string literal
Source File: http://98.214.38.110/allfours/site_flash/2.php
Line: 75, Column: 37
Source Code:
if (_ie == true) document.writeln('

___________________________________
with this code:

<?php
session_start();

return code();

function code() {
$user_id = $_SESSION['myusername'];
$tournament_id = $_SESSION['tournament_id'];
$game_id = $_SESSION['game_id'];
$roomNo = $_SESSION['roomNo'];
$portNo = (($roomNo - 1) * 10) + 5000;

return '

<!-- The following code is specified at the beginning of the <BODY>
tag. -->
<SCRIPT LANGUAGE="JavaScript">
<!--
function closeWindow() {
window.opener = "";
window.close();
}

var _info = navigator.userAgent;
var _ns = false;
var _ie = (_info.indexOf("MSIE") 0 && _info.indexOf("Win") 0
&& _info.indexOf("Windows 3.1") < 0);
//--></SCRIPT>

<COMMENT>
<SCRIPT LANGUAGE="JavaScript1.1">
<!--
function closeWindow() {
window.opener = "";
window.close();
}
var _ns = (navigator.appName.indexOf("Netscape") >= 0
&& ((_info.indexOf("Win") 0 && _info.indexOf("Win16") < 0
&& java.lang.System.getProperty("os.version").indexOf ("3.5") < 0)
|| _info.indexOf("Sun") 0));
//--></SCRIPT></COMMENT>

<!-- The following code is repeated for each APPLET tag -->
<SCRIPT LANGUAGE="JavaScript">
<!--
function closeWindow() {
window.opener = "";
window.close();
}

if (_ie == true) document.write(\'
<OBJECT
classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width="500" height="500" align="baseline"

codebase="http://java.sun.com/products/plugin/autodl/
jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0">

<param name = "mayscript" value = "true">
<param name="ARCHIVE"
value="client.jar,activation.jar,smtp.jar,mailapi. jar" >
<PARAM NAME="server" VALUE="98.214.38.110:' . $portNo . '" >
<PARAM NAME="bg-pic" VALUE="res/bgrounds/bg' .
$_SESSION['roomNo'] . '.jpg" >
<PARAM NAME="tournamentId" VALUE="' . $tournament_id . '" >
<PARAM NAME="tournamentGameId" VALUE="' . $game_id . '" >
<PARAM NAME="user" VALUE="' . $user_id . '" >
<NOEMBED><XMP>\');

else if (_ns == true) document.write(\'
<EMBED
type="application/x-java-applet;version=1.5.0" width="100"
height="100"
align="baseline"
code="com.caribbeancardsonline.allfours.client.Roo mClient"
ARCHIVE="client.jar","activation.jar","smtp.jar"," mailapi.jar"
codebase="http://98.214.38.110/allfours/"
server="98.214.38.110:' . $portNo . '" bg-pic="res/bgrounds/bg' .
$roomNo . '.jpg" user= "' . $user_id . '"
tournamentId="' . $tournament_id . '"
tournamentGameId="' . $game_id . '"
pluginspage="http://java.sun.com/products/plugin/autodl/
jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0">
<NOEMBED><XMP>
\');
//--></SCRIPT>

<APPLET code="com.caribbeancardsonline.allfours.client.Roo mClient"
ARCHIVE="client.jar,activation.jar,smtp.jar,mailap i.jar"
codebase="http://98.214.38.110/allfours/" align="baseline"
WIDTH=500 HEIGHT=500>

</XMP>

<param name = "mayscript" value = "true">
<PARAM NAME="java_code"
VALUE="com.caribbeancardsonline.allfours.client.Ro omClient">
<PARAM NAME="java_type" VALUE="application/x-java-
applet;version=1.5.0">
<PARAM NAME="server" VALUE="98.214.38.110:' . $portNo . '">
<PARAM NAME="bg-pic" VALUE="res/bgrounds/bg' . $roomNo . '.jpg">
<PARAM NAME="tournamentId" VALUE="' . $tournament_id . '" >
<PARAM NAME="tournamentGameId" VALUE="' . $game_id . '" >
<PARAM NAME="user" VALUE="' . $user_id . '">
<PARAM name="autostart" value="true">
<PARAM NAME="scriptable" VALUE="true">
No Java 2 SDK, Standard Edition v 1.5 support for APPLET!!
</APPLET></NOEMBED></EMBED></OBJECT>

<!--
<APPLET CODE="com.caribbeancardsonline.allfours.client.Roo mClient"
ARCHIVE="client.jar,activation.jar,smtp.jar,mailap i.jar"
<PARAM NAME="server" VALUE="98.214.38.110:' . $portNo . '">
<PARAM NAME="bg-pic" VALUE="res/bgrounds/bg' . $roomNo . '.jpg">
<PARAM NAME="tournamentId" VALUE="' . $tournament_id . '" />
<PARAM NAME="tournamentGameId" VALUE="' . $game_id . '" />
<PARAM NAME="user" VALUE="' . $user_id . '">
<PARAM name="autostart" value="true">
No Java 2 SDK, Standard Edition v 1.5 support for APPLET!!
</APPLET>
-->
';
}

?>

Sep 16 '08 #1
7 1497
It's a bit strange because it seems that you have correctly escaped the ' in
the code
Sep 16 '08 #2
ad****************@gmail.com wrote:
Im getting an error:

Error: unterminated string literal
Source File: http://98.214.38.110/allfours/site_flash/2.php
Line: 75, Column: 37
Source Code:
if (_ie == true) document.writeln('

___________________________________
with this code:
<code snipped>

No problem here with the code you posted. Is this ALL the code in your
file?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Sep 16 '08 #3
ad****************@gmail.com wrote:
Im getting an error:

Error: unterminated string literal
Source File: http://98.214.38.110/allfours/site_flash/2.php
Line: 75, Column: 37
Source Code:
if (_ie == true) document.writeln('
This seems to me like a perfect use for a nowdoc or even a heredoc.

Why bother with escaping when you don't have to?

return <<<'mystring'

'''' single or """" double quote away

mystring;

You may wish to check syntax, I still write a bit of perl when I
should be writing php.

Jeff
>
___________________________________
with this code:

<?php
session_start();

return code();

function code() {
$user_id = $_SESSION['myusername'];
$tournament_id = $_SESSION['tournament_id'];
$game_id = $_SESSION['game_id'];
$roomNo = $_SESSION['roomNo'];
$portNo = (($roomNo - 1) * 10) + 5000;

return '

<!-- The following code is specified at the beginning of the <BODY>
tag. -->
<SCRIPT LANGUAGE="JavaScript">
<!--
function closeWindow() {
window.opener = "";
window.close();
}

var _info = navigator.userAgent;
var _ns = false;
var _ie = (_info.indexOf("MSIE") 0 && _info.indexOf("Win") 0
&& _info.indexOf("Windows 3.1") < 0);
//--></SCRIPT>

<COMMENT>
<SCRIPT LANGUAGE="JavaScript1.1">
<!--
function closeWindow() {
window.opener = "";
window.close();
}
var _ns = (navigator.appName.indexOf("Netscape") >= 0
&& ((_info.indexOf("Win") 0 && _info.indexOf("Win16") < 0
&& java.lang.System.getProperty("os.version").indexOf ("3.5") < 0)
|| _info.indexOf("Sun") 0));
//--></SCRIPT></COMMENT>

<!-- The following code is repeated for each APPLET tag -->
<SCRIPT LANGUAGE="JavaScript">
<!--
function closeWindow() {
window.opener = "";
window.close();
}

if (_ie == true) document.write(\'
<OBJECT
classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width="500" height="500" align="baseline"

codebase="http://java.sun.com/products/plugin/autodl/
jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0">

<param name = "mayscript" value = "true">
<param name="ARCHIVE"
value="client.jar,activation.jar,smtp.jar,mailapi. jar" >
<PARAM NAME="server" VALUE="98.214.38.110:' . $portNo . '" >
<PARAM NAME="bg-pic" VALUE="res/bgrounds/bg' .
$_SESSION['roomNo'] . '.jpg" >
<PARAM NAME="tournamentId" VALUE="' . $tournament_id . '" >
<PARAM NAME="tournamentGameId" VALUE="' . $game_id . '" >
<PARAM NAME="user" VALUE="' . $user_id . '" >
<NOEMBED><XMP>\');

else if (_ns == true) document.write(\'
<EMBED
type="application/x-java-applet;version=1.5.0" width="100"
height="100"
align="baseline"
code="com.caribbeancardsonline.allfours.client.Roo mClient"
ARCHIVE="client.jar","activation.jar","smtp.jar"," mailapi.jar"
codebase="http://98.214.38.110/allfours/"
server="98.214.38.110:' . $portNo . '" bg-pic="res/bgrounds/bg' .
$roomNo . '.jpg" user= "' . $user_id . '"
tournamentId="' . $tournament_id . '"
tournamentGameId="' . $game_id . '"
pluginspage="http://java.sun.com/products/plugin/autodl/
jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0">
<NOEMBED><XMP>
\');
//--></SCRIPT>

<APPLET code="com.caribbeancardsonline.allfours.client.Roo mClient"
ARCHIVE="client.jar,activation.jar,smtp.jar,mailap i.jar"
codebase="http://98.214.38.110/allfours/" align="baseline"
WIDTH=500 HEIGHT=500>

</XMP>

<param name = "mayscript" value = "true">
<PARAM NAME="java_code"
VALUE="com.caribbeancardsonline.allfours.client.Ro omClient">
<PARAM NAME="java_type" VALUE="application/x-java-
applet;version=1.5.0">
<PARAM NAME="server" VALUE="98.214.38.110:' . $portNo . '">
<PARAM NAME="bg-pic" VALUE="res/bgrounds/bg' . $roomNo . '.jpg">
<PARAM NAME="tournamentId" VALUE="' . $tournament_id . '" >
<PARAM NAME="tournamentGameId" VALUE="' . $game_id . '" >
<PARAM NAME="user" VALUE="' . $user_id . '">
<PARAM name="autostart" value="true">
<PARAM NAME="scriptable" VALUE="true">
No Java 2 SDK, Standard Edition v 1.5 support for APPLET!!
</APPLET></NOEMBED></EMBED></OBJECT>

<!--
<APPLET CODE="com.caribbeancardsonline.allfours.client.Roo mClient"
ARCHIVE="client.jar,activation.jar,smtp.jar,mailap i.jar"
<PARAM NAME="server" VALUE="98.214.38.110:' . $portNo . '">
<PARAM NAME="bg-pic" VALUE="res/bgrounds/bg' . $roomNo . '.jpg">
<PARAM NAME="tournamentId" VALUE="' . $tournament_id . '" />
<PARAM NAME="tournamentGameId" VALUE="' . $game_id . '" />
<PARAM NAME="user" VALUE="' . $user_id . '">
<PARAM name="autostart" value="true">
No Java 2 SDK, Standard Edition v 1.5 support for APPLET!!
</APPLET>
-->
';
}

?>
Sep 16 '08 #4
ad****************@gmail.com wrote:
Im getting an error:

Error: unterminated string literal
Source File: http://98.214.38.110/allfours/site_flash/2.php
Line: 75, Column: 37
Source Code:
if (_ie == true) document.writeln('

___________________________________
with this code:

<?php
session_start();

return code();

function code() {
$user_id = $_SESSION['myusername'];
$tournament_id = $_SESSION['tournament_id'];
$game_id = $_SESSION['game_id'];
$roomNo = $_SESSION['roomNo'];
$portNo = (($roomNo - 1) * 10) + 5000;

return '

<!-- The following code is specified at the beginning of the <BODY>
tag. -->
<SCRIPT LANGUAGE="JavaScript">
<!--
function closeWindow() {
window.opener = "";
window.close();
}

var _info = navigator.userAgent;
var _ns = false;
var _ie = (_info.indexOf("MSIE") 0 && _info.indexOf("Win") 0
&& _info.indexOf("Windows 3.1") < 0);
//--></SCRIPT>

<COMMENT>
<SCRIPT LANGUAGE="JavaScript1.1">
<!--
function closeWindow() {
window.opener = "";
window.close();
}
var _ns = (navigator.appName.indexOf("Netscape") >= 0
&& ((_info.indexOf("Win") 0 && _info.indexOf("Win16") < 0
&& java.lang.System.getProperty("os.version").indexOf ("3.5") < 0)
|| _info.indexOf("Sun") 0));
//--></SCRIPT></COMMENT>

<!-- The following code is repeated for each APPLET tag -->
<SCRIPT LANGUAGE="JavaScript">
<!--
function closeWindow() {
window.opener = "";
window.close();
}

if (_ie == true) document.write(\'
<OBJECT
classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width="500" height="500" align="baseline"

codebase="http://java.sun.com/products/plugin/autodl/
jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0">

<param name = "mayscript" value = "true">
<param name="ARCHIVE"
value="client.jar,activation.jar,smtp.jar,mailapi. jar" >
<PARAM NAME="server" VALUE="98.214.38.110:' . $portNo . '" >
<PARAM NAME="bg-pic" VALUE="res/bgrounds/bg' .
$_SESSION['roomNo'] . '.jpg" >
<PARAM NAME="tournamentId" VALUE="' . $tournament_id . '" >
<PARAM NAME="tournamentGameId" VALUE="' . $game_id . '" >
<PARAM NAME="user" VALUE="' . $user_id . '" >
<NOEMBED><XMP>\');

else if (_ns == true) document.write(\'
<EMBED
type="application/x-java-applet;version=1.5.0" width="100"
height="100"
align="baseline"
code="com.caribbeancardsonline.allfours.client.Roo mClient"
ARCHIVE="client.jar","activation.jar","smtp.jar"," mailapi.jar"
codebase="http://98.214.38.110/allfours/"
server="98.214.38.110:' . $portNo . '" bg-pic="res/bgrounds/bg' .
$roomNo . '.jpg" user= "' . $user_id . '"
tournamentId="' . $tournament_id . '"
tournamentGameId="' . $game_id . '"
pluginspage="http://java.sun.com/products/plugin/autodl/
jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0">
<NOEMBED><XMP>
\');
//--></SCRIPT>

<APPLET code="com.caribbeancardsonline.allfours.client.Roo mClient"
ARCHIVE="client.jar,activation.jar,smtp.jar,mailap i.jar"
codebase="http://98.214.38.110/allfours/" align="baseline"
WIDTH=500 HEIGHT=500>

</XMP>

<param name = "mayscript" value = "true">
<PARAM NAME="java_code"
VALUE="com.caribbeancardsonline.allfours.client.Ro omClient">
<PARAM NAME="java_type" VALUE="application/x-java-
applet;version=1.5.0">
<PARAM NAME="server" VALUE="98.214.38.110:' . $portNo . '">
<PARAM NAME="bg-pic" VALUE="res/bgrounds/bg' . $roomNo . '.jpg">
<PARAM NAME="tournamentId" VALUE="' . $tournament_id . '" >
<PARAM NAME="tournamentGameId" VALUE="' . $game_id . '" >
<PARAM NAME="user" VALUE="' . $user_id . '">
<PARAM name="autostart" value="true">
<PARAM NAME="scriptable" VALUE="true">
No Java 2 SDK, Standard Edition v 1.5 support for APPLET!!
</APPLET></NOEMBED></EMBED></OBJECT>

<!--
<APPLET CODE="com.caribbeancardsonline.allfours.client.Roo mClient"
ARCHIVE="client.jar,activation.jar,smtp.jar,mailap i.jar"
<PARAM NAME="server" VALUE="98.214.38.110:' . $portNo . '">
<PARAM NAME="bg-pic" VALUE="res/bgrounds/bg' . $roomNo . '.jpg">
<PARAM NAME="tournamentId" VALUE="' . $tournament_id . '" />
<PARAM NAME="tournamentGameId" VALUE="' . $game_id . '" />
<PARAM NAME="user" VALUE="' . $user_id . '">
<PARAM name="autostart" value="true">
No Java 2 SDK, Standard Edition v 1.5 support for APPLET!!
</APPLET>
-->
';
}

?>
I have always found it much simpler to do things in little pieces rather
than try to swallow something whole.

I would suggest building a string for what you want to return. That is:

$str = '<!-- The following code is specified at the beginning of the
<BODYtag. -->';
$str .= some_more_stuff
and so on
and then
return $str;

That way what you are writing becomes clearer, much easier to read, and
also you will receive php errors for any line that is not correctly done.
Sep 16 '08 #5
ad****************@gmail.com wrote:
Im getting an error:

Error: unterminated string literal
Source File: http://98.214.38.110/allfours/site_flash/2.php
Line: 75, Column: 37
Source Code:
if (_ie == true) document.writeln('

___________________________________
with this code:

<?php
session_start();

return code();

function code() {
$user_id = $_SESSION['myusername'];
$tournament_id = $_SESSION['tournament_id'];
$game_id = $_SESSION['game_id'];
$roomNo = $_SESSION['roomNo'];
$portNo = (($roomNo - 1) * 10) + 5000;

return '

<!-- The following code is specified at the beginning of the <BODY>
tag. -->
<SCRIPT LANGUAGE="JavaScript">
<!--
function closeWindow() {
window.opener = "";
window.close();
}

var _info = navigator.userAgent;
var _ns = false;
var _ie = (_info.indexOf("MSIE") 0 && _info.indexOf("Win") 0
&& _info.indexOf("Windows 3.1") < 0);
//--></SCRIPT>

<COMMENT>
<SCRIPT LANGUAGE="JavaScript1.1">
<!--
function closeWindow() {
window.opener = "";
window.close();
}
var _ns = (navigator.appName.indexOf("Netscape") >= 0
&& ((_info.indexOf("Win") 0 && _info.indexOf("Win16") < 0
&& java.lang.System.getProperty("os.version").indexOf ("3.5") < 0)
|| _info.indexOf("Sun") 0));
//--></SCRIPT></COMMENT>

<!-- The following code is repeated for each APPLET tag -->
<SCRIPT LANGUAGE="JavaScript">
<!--
function closeWindow() {
window.opener = "";
window.close();
}

if (_ie == true) document.write(\'
<OBJECT
classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width="500" height="500" align="baseline"

codebase="http://java.sun.com/products/plugin/autodl/
jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0">

<param name = "mayscript" value = "true">
<param name="ARCHIVE"
value="client.jar,activation.jar,smtp.jar,mailapi. jar" >
<PARAM NAME="server" VALUE="98.214.38.110:' . $portNo . '" >
<PARAM NAME="bg-pic" VALUE="res/bgrounds/bg' .
$_SESSION['roomNo'] . '.jpg" >
<PARAM NAME="tournamentId" VALUE="' . $tournament_id . '" >
<PARAM NAME="tournamentGameId" VALUE="' . $game_id . '" >
<PARAM NAME="user" VALUE="' . $user_id . '" >
<NOEMBED><XMP>\');

else if (_ns == true) document.write(\'
<EMBED
type="application/x-java-applet;version=1.5.0" width="100"
height="100"
align="baseline"
code="com.caribbeancardsonline.allfours.client.Roo mClient"
ARCHIVE="client.jar","activation.jar","smtp.jar"," mailapi.jar"
codebase="http://98.214.38.110/allfours/"
server="98.214.38.110:' . $portNo . '" bg-pic="res/bgrounds/bg' .
$roomNo . '.jpg" user= "' . $user_id . '"
tournamentId="' . $tournament_id . '"
tournamentGameId="' . $game_id . '"
pluginspage="http://java.sun.com/products/plugin/autodl/
jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0">
<NOEMBED><XMP>
\');
//--></SCRIPT>

<APPLET code="com.caribbeancardsonline.allfours.client.Roo mClient"
ARCHIVE="client.jar,activation.jar,smtp.jar,mailap i.jar"
codebase="http://98.214.38.110/allfours/" align="baseline"
WIDTH=500 HEIGHT=500>

</XMP>

<param name = "mayscript" value = "true">
<PARAM NAME="java_code"
VALUE="com.caribbeancardsonline.allfours.client.Ro omClient">
<PARAM NAME="java_type" VALUE="application/x-java-
applet;version=1.5.0">
<PARAM NAME="server" VALUE="98.214.38.110:' . $portNo . '">
<PARAM NAME="bg-pic" VALUE="res/bgrounds/bg' . $roomNo . '.jpg">
<PARAM NAME="tournamentId" VALUE="' . $tournament_id . '" >
<PARAM NAME="tournamentGameId" VALUE="' . $game_id . '" >
<PARAM NAME="user" VALUE="' . $user_id . '">
<PARAM name="autostart" value="true">
<PARAM NAME="scriptable" VALUE="true">
No Java 2 SDK, Standard Edition v 1.5 support for APPLET!!
</APPLET></NOEMBED></EMBED></OBJECT>

<!--
<APPLET CODE="com.caribbeancardsonline.allfours.client.Roo mClient"
ARCHIVE="client.jar,activation.jar,smtp.jar,mailap i.jar"
<PARAM NAME="server" VALUE="98.214.38.110:' . $portNo . '">
<PARAM NAME="bg-pic" VALUE="res/bgrounds/bg' . $roomNo . '.jpg">
<PARAM NAME="tournamentId" VALUE="' . $tournament_id . '" />
<PARAM NAME="tournamentGameId" VALUE="' . $game_id . '" />
<PARAM NAME="user" VALUE="' . $user_id . '">
<PARAM name="autostart" value="true">
No Java 2 SDK, Standard Edition v 1.5 support for APPLET!!
</APPLET>
-->
';
}

?>
Your error is with the JavaScript. It's a syntax error when splitting
document.writeln's argument over multiple lines (not unlike printf in
C). Instead, use

document.writeln('Text text'
+ 'More text'
+ '...');

or multiple calls to document.writeln.

In addition to this, some of your JS is quite outdated, such as use of
the navigator object for browser detection.

Try checking out:

comp.lang.javascript
<URL:http://www.quirksmode.org>

--
Curtis
Sep 16 '08 #6
On Sep 16, 11:35 am, Curtis <dye...@gmail.comwrote:
adrian.bartholo...@gmail.com wrote:
Im getting an error:
Error: unterminated string literal
Source File:http://98.214.38.110/allfours/site_flash/2.php
Line: 75, Column: 37
Source Code:
if (_ie == true) document.writeln('
___________________________________
with this code:
<?php
session_start();
return code();
function code() {
$user_id = $_SESSION['myusername'];
$tournament_id = $_SESSION['tournament_id'];
$game_id = $_SESSION['game_id'];
$roomNo = $_SESSION['roomNo'];
$portNo = (($roomNo - 1) * 10) + 5000;
return '
<!-- The following code is specified at the beginning of the <BODY>
tag. -->
<SCRIPT LANGUAGE="JavaScript">
<!--
function closeWindow() {
window.opener = "";
window.close();
}
var _info = navigator.userAgent;
var _ns = false;
var _ie = (_info.indexOf("MSIE") 0 && _info.indexOf("Win") 0
&& _info.indexOf("Windows 3.1") < 0);
//--></SCRIPT>
<COMMENT>
<SCRIPT LANGUAGE="JavaScript1.1">
<!--
function closeWindow() {
window.opener = "";
window.close();
}
var _ns = (navigator.appName.indexOf("Netscape") >= 0
&& ((_info.indexOf("Win") 0 && _info.indexOf("Win16") < 0
&& java.lang.System.getProperty("os.version").indexOf ("3.5") < 0)
|| _info.indexOf("Sun") 0));
//--></SCRIPT></COMMENT>
<!-- The following code is repeated for each APPLET tag -->
<SCRIPT LANGUAGE="JavaScript">
<!--
function closeWindow() {
window.opener = "";
window.close();
}
if (_ie == true) document.write(\'
<OBJECT
classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width="500" height="500" align="baseline"
codebase="http://java.sun.com/products/plugin/autodl/
jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0">
<param name = "mayscript" value = "true">
<param name="ARCHIVE"
value="client.jar,activation.jar,smtp.jar,mailapi. jar" >
<PARAM NAME="server" VALUE="98.214.38.110:' . $portNo . '" >
<PARAM NAME="bg-pic" VALUE="res/bgrounds/bg' .
$_SESSION['roomNo'] . '.jpg" >
<PARAM NAME="tournamentId" VALUE="' . $tournament_id . '" >
<PARAM NAME="tournamentGameId" VALUE="' . $game_id . '" >
<PARAM NAME="user" VALUE="' . $user_id . '" >
<NOEMBED><XMP>\');
else if (_ns == true) document.write(\'
<EMBED
type="application/x-java-applet;version=1.5.0" width="100"
height="100"
align="baseline"
code="com.caribbeancardsonline.allfours.client.Roo mClient"
ARCHIVE="client.jar","activation.jar","smtp.jar"," mailapi.jar"
codebase="http://98.214.38.110/allfours/"
server="98.214.38.110:' . $portNo . '" bg-pic="res/bgrounds/bg' .
$roomNo . '.jpg" user= "' . $user_id . '"
tournamentId="' . $tournament_id . '"
tournamentGameId="' . $game_id . '"
pluginspage="http://java.sun.com/products/plugin/autodl/
jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0">
<NOEMBED><XMP>
\');
//--></SCRIPT>
<APPLET code="com.caribbeancardsonline.allfours.client.Roo mClient"
ARCHIVE="client.jar,activation.jar,smtp.jar,mailap i.jar"
codebase="http://98.214.38.110/allfours/" align="baseline"
WIDTH=500 HEIGHT=500>
</XMP>
<param name = "mayscript" value = "true">
<PARAM NAME="java_code"
VALUE="com.caribbeancardsonline.allfours.client.Ro omClient">
<PARAM NAME="java_type" VALUE="application/x-java-
applet;version=1.5.0">
<PARAM NAME="server" VALUE="98.214.38.110:' . $portNo . '">
<PARAM NAME="bg-pic" VALUE="res/bgrounds/bg' . $roomNo . '.jpg">
<PARAM NAME="tournamentId" VALUE="' . $tournament_id . '" >
<PARAM NAME="tournamentGameId" VALUE="' . $game_id . '" >
<PARAM NAME="user" VALUE="' . $user_id . '">
<PARAM name="autostart" value="true">
<PARAM NAME="scriptable" VALUE="true">
No Java 2 SDK, Standard Edition v 1.5 support for APPLET!!
</APPLET></NOEMBED></EMBED></OBJECT>
<!--
<APPLET CODE="com.caribbeancardsonline.allfours.client.Roo mClient"
ARCHIVE="client.jar,activation.jar,smtp.jar,mailap i.jar"
<PARAM NAME="server" VALUE="98.214.38.110:' . $portNo . '">
<PARAM NAME="bg-pic" VALUE="res/bgrounds/bg' . $roomNo . '.jpg">
<PARAM NAME="tournamentId" VALUE="' . $tournament_id . '" />
<PARAM NAME="tournamentGameId" VALUE="' . $game_id . '" />
<PARAM NAME="user" VALUE="' . $user_id . '">
<PARAM name="autostart" value="true">
No Java 2 SDK, Standard Edition v 1.5 support for APPLET!!
</APPLET>
-->
';
}
?>

Your error is with the JavaScript. It's a syntax error when splitting
document.writeln's argument over multiple lines (not unlike printf in
C). Instead, use

document.writeln('Text text'
+ 'More text'
+ '...');

or multiple calls to document.writeln.

In addition to this, some of your JS is quite outdated, such as use of
the navigator object for browser detection.

Try checking out:

comp.lang.javascript
<URL:http://www.quirksmode.org>

--
Curtis
Thank you so much. It worked!
I used the "+'...') thing.
Have not yet checked out the navigator object workaround but I will.
The quirksome site is awesome and I will have many pleasurable hours
perusing it for my specific task.
Thanks again.
Sep 17 '08 #7
ad****************@gmail.com wrote:
On Sep 16, 11:35 am, Curtis <dye...@gmail.comwrote:
>adrian.bartholo...@gmail.com wrote:
>>Im getting an error:
Error: unterminated string literal
Source File:http://98.214.38.110/allfours/site_flash/2.php
Line: 75, Column: 37
Source Code:
if (_ie == true) document.writeln('
___________________________________
with this code:
[code snipped]
>Your error is with the JavaScript. It's a syntax error when splitting
document.writeln's argument over multiple lines (not unlike printf in
C). Instead, use

document.writeln('Text text'
+ 'More text'
+ '...');

or multiple calls to document.writeln.

In addition to this, some of your JS is quite outdated, such as use of
the navigator object for browser detection.

Try checking out:

comp.lang.javascript
<URL:http://www.quirksmode.org>

--
Curtis

Thank you so much. It worked!
I used the "+'...') thing.
Have not yet checked out the navigator object workaround but I will.
The quirksome site is awesome and I will have many pleasurable hours
perusing it for my specific task.
Thanks again.
Glad it helped, good luck to you.

--
Curtis
Sep 17 '08 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4358
by: AIM | last post by:
Error in msvc in building inheritance.obj to build hello.pyd Hello, I am trying to build the boost 1.31.0 sample extension hello.cpp. I can not compile the file inheritance.cpp because the two...
2
2933
by: Gregory | last post by:
Hi, One of the disadvantages of using error handling with error codes instead of exception handling is that error codes retuned from a function can be forgotten to check thus leading to...
13
6569
by: deko | last post by:
I use this convention frequently: Exit_Here: Exit Sub HandleErr: Select Case Err.Number Case 3163 Resume Next Case 3376 Resume Next
7
4976
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying....
3
16188
by: Manuel | last post by:
I'm trying to compile glut 3.7.6 (dowbloaded from official site)using devc++. So I've imported the glut32.dsp into devc++, included manually some headers, and start to compile. It return a very...
0
11998
by: bazzer | last post by:
hey, im trying to access a microsoft access database from an ASP.NET web application in visual basic 2003.NET. i get the following error when i try running it: Server Error in...
1
3260
by: developer | last post by:
Hi All I have made a .NET project. the files included are borland c++ files that i am migrate to VC++ .NET I am using Microsoft Visual C++ .NET 2003. the compilation goes through properly,...
0
4714
by: mchuc7719 | last post by:
Hello, I have a Vb.Net 2005 ClassLibrary, when I try to compile using MSBee, only get errors. Before I to run the command line, I open in notepad the .vbproj and I was add the next line: ...
2
19391
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
2897
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
7105
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7132
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7180
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6846
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
4870
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4564
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3076
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1381
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
266
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.