0

I have wrote JS calculator and need include it into mojoPortal site. I have upload js files to directory /calculator/ and add script tags at page content. But when browser request http://example.com/calculator/calculator.js it get 500 error:

Runtime Error

Description: An exception occurred while processing your request. Additionally, another exception occurred while executing the custom error page for the first exception. The request has been terminated.

How I can disable execution of this folder or attach files in code?

gvozd1989
  • 300
  • 1
  • 16

1 Answers1

0

Rather than trying to open the javascript file directly from the webserver you need to embed it in a web page like this:

<html>
<head><script type="text/javascript" src="myfile.js"></script></head>
<body><p>Code running...</p></body>
</html>

In terms using javascript in Mojoportal, there is a custom javascript module which you can use to insert javascript into a Mojoportal page see adding custom javascript