Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This SyntaxError usually relates to a loaded JavaScript resource. These are common mistakes that can trigger this error message:</p> <pre><code>&lt;script type="text/javascript"&gt; &lt;script type="text/javascript"&gt; [...] &lt;/script&gt; &lt;/script&gt; &lt;script type="text/javascript"&gt; var s = I forgot the opening quotes so this &lt;html&gt; tag will break the script'; &lt;/script&gt; &lt;script type="text/javascript" var s = 'Here we forgot to close the opening &lt;script&gt; tag! Boom!'; &lt;/script&gt; </code></pre> <p>It could also be triggered by the server setting the content type to 'application/javascript' for a non-JS resource (which then again includes this tags).</p> <p>I also remember reading that this happened to someone using a minified version of a JavaScript library, but no details on the exact reason were given (other than that the problem was solved by using the non-minified version.</p> <p>You can also wrap your JS resources in a CDATA tag for debugging purposes which should get rid of the SyntaxError and probably bring up a standard JS error message for the invalid script.</p> <pre><code>&lt;script&gt;&lt;![CDATA[ /* Code here */ ]]&gt;&lt;/script&gt; </code></pre> <p>Once you identify the resource that triggers the exception it should be possible to spot the problem by doing a through study of the source with your CSI sunglasses on. </p> <p>Note: my assumption is that it can*not* be triggered by data that is sent <em>to</em> the server, but only data that is returned <em>from</em> the server. This is because the error refers to the parsing process on the client. But I'm not 100% sure on this one.</p> <p>If this doesn't help you should really post the involved code and/or explain what you do exactly when you 'added a javascript method to the onSubmit attribute of [your] form'.</p>
    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.
    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