Sharepoint 365 doesn't render the Javascript Code Inside the Script Editor

Copper Contributor

I have having issue with SharePoint 365 where the .aspx file doesn't render the JavaScript code in the script editor. Here is my scenario:

  • I have a JavaScript script file named helloworldtest.js in my Site Assets Folder
  • I have HelloWorld.aspx file in my Site Pages Folder

JavaScript file (helloworldtest.js) has following code:


alert("Hello World! This is Test Ran by Bee");


I have added the JavaScript code in the Script Editor section on HelloWorld.aspx page. Below is the code I added in the script editor section:


<script type="text/javascript" src="../SiteAssets/helloworldtest.js"></script>


Problem: I think my java script file and script correct on the script editor in .aspx file but SharePoint 365 is not rendering the alert.

I am new to SharePoint 365 so if anyone has any experience working with SharePoint 365 script editor and have gone through this problem before, please help me out here and be kind enough to tell me your experience and solution that you adopted. Thank You!

0 Replies