Page 1 of 1

Uncaught SyntaxError: Unexpected token ILLEGAL

Posted: Mon May 16, 2011 8:31 pm
by cap2cap10
Greetings again, members of the php technorati. Ok this is a continuation of my last post include/require fiasco! This is the error that is causing the page to ignore the require php insert:

Uncaught SyntaxError: Unexpected token ILLEGAL

Here is the code for the page:

Code: Select all

<?php
$candidateID = $_GET['candidateID'];
require 'open_db.php';
$prelim_db = mysql_query("SELECT * FROM prelim_db WHERE candidateID = '$candidateID'")
or die(mysql_error());
$row4 = mysql_fetch_array( $prelim_db );

mysql_query("UPDATE prelim_db SET interv_date = CURDATE() WHERE candidateID = '$candidateID'")or die('Query failed: ' . mysql_error());

mysql_query("UPDATE prelim_db SET  p_count = 16 WHERE candidateID = '$candidateID'") or die(mysql_error());

If ($row4['q_count'] == $row4['p_count']){
mysql_query("UPDATE prelim_db SET q_finish = 'Yes' WHERE candidateID = '$candidateID'" );

header("Location: completed.php?candidateID=$candidateID");
 }
 require 'resp_nm.php';
 mysql_close();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <title>Preliminary Interview Series</title>
 <link href="images/style.css" rel="stylesheet" type="text/css">
 <link rel="icon" href="images/logo1.png" type="image/png">
<meta http-equiv="refresh" content="600; url=times_up.php?candidateID=<?php echo $candidateID ; ?>&interv=q_acc">
</head>
<body>
<table summary="" border="0" width="750">
        	<tr>
        		<td><? include 'holiday_logo.php' ?>
</td>

     	</tr>
        </table>
<table border="0" cellspacing="0" cellpadding="0" height="25" width="750" background="images/menu_bg.gif">

<tr >
       <td class="menus" style="padding-left: 18px;"  valign="middle"><span class="menu">Preliminary Interview Series - Candidate ID#: <?php echo $candidateID ;?> </span> </td>
       <td width="4" height="24" align="left" valign="top"><img src="images/menu_separater.gif" width="3" height="24"></td>
       <td width="250" height="24" align="center" valign="middle" class="menu" ><span class="menus">Time remaining :<span id="seconds">600</span> seconds.</span></td>
</tr>
</table><P>
<script>
      var seconds = 600;
      setInterval(
        function(){
          document.getElementById('seconds').innerHTML = --seconds;
        }, 1000
      );
    </script>

<table border="0" width="550">
<tr>
  <td><?php
  if ($row4['my_avatar'] == 1){
echo "<img src=images/sm_avatar_1.jpg width=57 height=85 border=1 bordercolor=black>";
}
elseif ($row4['my_avatar'] == 2){
echo "<img src=images/sm_avatar_2.jpg width=57 height=85 border=1 bordercolor=black>";
}
?></td>
  <td><?php
  if ($row4['my_avatar'] == 1){
echo "<span class=style12>Aeryn</span>";
}
elseif ($row4['my_avatar'] == 2){
echo "<span class=style12>Sean</span>";
}
?>:</td>
  <td><?php include 'next_5.php'; ?></td>
</tr>
</table><P>
<table border="0" width="750">
<tr>
  <td valign="top"colspan="3"><span class=style1>Response:</span><br>
  <?php
  Print "<form method=POST Action=insert_resp.php>
  <textarea name=".$row4['resp_nm']." rows=15 cols=70 ></textarea><p>
  <input type=hidden name=submit_1 value=true />
  <input type=hidden name=candidateID value=".$candidateID." />
	<center><input type=submit name=submit value=Next /></center><p>
</form>";?></td>
</tr>
</table><p>

</body>
</html>
I just can't see what is causing this "uncaught syntax" error. I am open to all hypotheses.

Thanks in advance,

Batoe

Re: Uncaught SyntaxError: Unexpected token ILLEGAL

Posted: Tue May 17, 2011 11:54 am
by cap2cap10
Update. This error is being caused by an ad that is placed there by the browser. Here is the error:

Uncaught SyntaxError: Unexpected token ILLEGAL
Here is your link:
http://api.yontoo.com/LoadJS.ashx?id=76 ... 1296182131

The file only has "#".
Anyone know how to block these ads from the server side so that it doesn't interfere with the php programming?

Batoe