Hey @briapril30 , I didn’t forget about you. I was trying to clear up the issue of public files. And it’s like this…
The masterPage.js file is if you want to add processing for your header or footer, and to handle elements that you want to put on every page (with the same element ID). This file has its own onReady() event handler.
The main idea behind Public code files is for code reuse . The Public section is where you put JavaScript files that contain the code you want to use on multiple pages in your site, without having to include the code on each page. As with the masterPage.js file, you can access page elements from Public files. The problem is that you can’t be sure from which page the Public files are used and it follows that you can’t be sure which components are available on the page. So, while it is possible, it is not encouraged.
The masterPage.js file and Public files, are intended for different uses, but are similar in that they both have the same scope, and that you can access page elements from both types of files. For Public code, best practice is to pass the elements from the page code to the public files .
Cheers ![]()