NetTalk Central

Author Topic: Error in site JavaScript  (Read 7292 times)

FaithWorks

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Error in site JavaScript
« on: June 11, 2019, 02:21:44 PM »
We copied the required files and folders to our Cloud Server.
When we type in Localhost:88, we get the following messatge:
"Error in site JavaScript"

Help.  What are we doing wrong?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Error in site JavaScript
« Reply #1 on: June 11, 2019, 10:13:26 PM »
does the error appear, then disappear, or just appear and stay there?

If it appears and stays there then check your Browser, Developer Tools, Console window for the error.

If it appears and disappears then this is "by design" behaviour that checks for javascript errors. You can disable the test (when deploying) using the template setting on the Performance tab.

cheers
Bruce

FaithWorks

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Re: Error in site JavaScript
« Reply #2 on: June 13, 2019, 04:54:21 AM »
If it appears and stays there.
The display of the web-page is also not formatted.

FaithWorks

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Re: Error in site JavaScript
« Reply #3 on: June 13, 2019, 04:55:30 AM »
It appears and stays there. 
The display of the web-page is also not formatted the same as on the local machine.

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Error in site JavaScript
« Reply #4 on: June 13, 2019, 08:16:25 AM »
Regarding this:

The display of the web-page is also not formatted the same as on the local machine.

Do you have the Settings controls added to your web server? (see attachment)

If you do, make sure the paths for your web folder is correct.  Sometimes that path can be incorrect when copying your files from one machine to another.

Don

"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Error in site JavaScript
« Reply #5 on: June 15, 2019, 02:38:21 AM »
Hi,

I have the same problem NT11.13 . See attachment.
(I don't know where the :46 comes from in the bottom line of the error-list.)

The red banner with "Error in site JavaScript" stays visible in the web-page all the time.

The button-clicks are received in the web-server. I can see that in the performance tab of the NTWS-Window. But nothing like e.g. a form appearing, happens.
Also the icons have disappeared from the buttons.

Cheers,
René
« Last Edit: June 15, 2019, 02:50:22 AM by Rene Simons »
Rene Simons
NT14.14

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Error in site JavaScript
« Reply #6 on: June 18, 2019, 11:13:21 PM »
>> If it appears and stays there. The display of the web-page is also not formatted.

If that is the case then open developer tools in the browser, and take a look at the console there for the errors. If the error does not mean much to you then post a screen-shot here like Rene did.

Cheers
Bruce



 

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Error in site JavaScript
« Reply #7 on: June 18, 2019, 11:18:27 PM »
"nts is not defined"

nts is declared in nt-websockets.js which implies you are using web socket functionality on one or more windows, but either;
a) you have not ticked on support for web sockets on the WebServer procedure, scripts tab or
b) you haven't run gzipall.bat since turning that on or
c) you have not deployedd the new all.js and all.js.gz

Cheers
Bruce

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Error in site JavaScript
« Reply #8 on: June 19, 2019, 12:34:07 PM »
Hi Bruce,

It WAS the sockets-thing that was wrong.
Everything looks and behaves normal again.
Thanks,

René
Rene Simons
NT14.14