Note that there are some explanatory texts on larger screens.

plurals
  1. POscript loaded as plain text - The character encoding of the plain text document was not declared.
    primarykey
    data
    text
    <p>Obviously this isn't the final form, but a snippet I created to debug the form. It still has the same error as the final form. I've been working on this one for hours.</p> <p>No other javascript in any other html form on my client localhost does this. This is in a MAMP environemnt on a MAC.</p> <p>It's just here and I can't get fix it to save my a**. Advice most welcome at this point. It's got to be something simple. I've tried all the hard stuff and it has no effect on the outcome.</p> <h3>html file contents</h3> <pre><code>&lt;!DOCTYPE html&gt; &lt;head&gt; &lt;meta charset="utf-8" /&gt; &lt;title&gt;NCSA Contact Form&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;form action="test.js" name="frmNcsa" id="frmNcsa" method="post"&gt; &lt;input type="submit" name="submitData" id="submitData" value="Submit"/&gt; &lt;/form&gt; &lt;script type="text/javascript" src="test.js"&gt;&lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <h3>test.js file contents</h3> <pre><code> var $ = function(id){ document.getElementById(id) } function prepareEventHandlers() { alert("This is test.js") } window.onload = function () { prepareEventHandlers(); } </code></pre> <h3>Firefox Error Message</h3> <p>The character encoding of the plain text document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the file needs to be declared in the transfer protocol or file needs to use a byte order mark as an encoding signature.</p> <h3>After Page Reloads</h3> <p>What I see in the browser after clicking the form submit button Page reloads, submit button gone. The JS file is read into the browser as text</p> <pre><code>var $ = function(id){ document.getElementById(id) } function prepareEventHandlers() { alert("This is test.js") } window.onload = function () { prepareEventHandlers(); } </code></pre> <h2>What should clicking submit do?</h2> <p>An alert dialog box that says "This is a test".</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.
 

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