Note that there are some explanatory texts on larger screens.

plurals
  1. POUncaught SyntaxError: Unexpected token }, no visible error?
    primarykey
    data
    text
    <p>I am getting the error "Uncaught SyntaxError: Unexpected token }" on index.php (line: 30) when i try and run certain functions of my web app (while other functions seem to work fine). </p> <p>I've slightly narrowed down the problem. The error seems to occur at the <code>"&lt;?php"</code> opening tag (I found this because adding a line after this tag doesn't change the line the error is given for, but an extra line before the tag and the error is given for line: 31). I've put the code in note-pad++ to check for hidden characters, I couldn't find anything out of place. Dreamweaver gives no syntax errors...</p> <p>I've also looked at my AJAX JS functions (which are in a separate file). No syntax errors there, no out of place characters either.</p> <p>QUESTION: Can anyone see or explain what is causing this error?</p> <p>I'll place the code surrounding "line: 30" where the error is meant to be. The full code is here on github (to large to post all code here):</p> <p><a href="https://github.com/bcdawber/URL-Vault-Web-Application" rel="nofollow">https://github.com/bcdawber/URL-Vault-Web-Application</a></p> <p>CODE:</p> <pre><code> &lt;/head&gt; &lt;body onLoad="showUrl('All URLs')"&gt; //console suggests error is somewhere here? &lt;?php session_start(); if(isset($_SESSION['userid'])) { echo '&lt;div class="container"&gt;'; echo '&lt;div class="panel" id="backgroundPanel"&gt;'; echo '&lt;div class="row"&gt;'; echo '&lt;div class="large-12 columns"&gt;'; echo '&lt;div class="panel"&gt;'; echo '&lt;p&gt;&lt;h2 id="title"&gt;URL VAULT&lt;/h2&gt;'; echo '&lt;h4 id="title"&gt;A Web Application for Storing URLs to Online Media.&lt;/h4&gt;&lt;/p&gt;'; echo '&lt;/div&gt;'; // &lt;!-- END PANEL --&gt; echo '&lt;/div&gt;'; // &lt;!-- END COLUMN (12) --&gt; echo '&lt;/div&gt;'; // &lt;!-- END ROW --&gt; ........... </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload