You may be wondering why you might want to accomplish this goal. These include:
- Adding custom page on-load events
- Creating custom targets for Home Page and Navigation Bar Resources
There are three stages to this tutorial:-
- Create the custom.js file
- Modify the ilm2.master file
- Test the solution with a basic alert pop-up
1) Navigate to C:\Program Files\Common Files\microsoft shared\Web Server Extensions\14\TEMPLATE\LAYOUTS
2) Create an empty file called custom.js and add the content below:-
3) Navigate to C:\Program Files\Common Files\microsoft shared\Web Server Extensions\14\TEMPLATE\FEATURES\MSILM2MasterPage
4) Edit the ilm2.master file with notepad and add the following line as shown in the image below:-
Note: Ensure you take a backup of the ilm2.master file as a matter of best practice.
5) Refresh your FIM/MIM web page and you should see the pop up as shown below.
Note:- You should comment out this line in the custom.js file when you are satisfied the tutorial has worked.