In most cases where users have trouble getting my solutions to work, the problem is the script references. I will give a few examples here on how to troubleshoot these cases.
To copy the script from sourcecode provided in the article, hover over the script and click “view source”. Highlight, copy and paste in notepad. Save with the correct file extension like this:
- Select “Save as” from the file menu and be sure to use the “.js” extention in the file name. Below the file name, you find a drop down where you can set the file type.
- Select “All files”. If you don not do this the file will be saved as “fielname.js.txt”.
To check that the scripts are referred correctly, insert an alert in the CEWP like this:
Both these alerts should give a dialog box with the text “function”. If you get “undefined”, the script reference are wrong.
In most cases the CEWP must be placed below the list for or list view for the code to work.