TechTip: SharePoint 2007 JavaScript Errors

Since upgrading to SharePoint 2007, every once in a while our users would report persistent JavaScript errors when trying to access page menus. The erros would be persistent on the affected system, on all user profiles and re-installing the browser or Microsoft Office would not fix the problem.

After a few months of re-imaging the machines (which would of course fix the issue) and looking for a more elegant solution, one was finally found by our intern:

  • Close all Internet Explorer windows (if any still listed in Task Manager, highlight them and End Task).
  • Go to Start --> Run... and enter Regsvr32 /u urlmon.dll then click OK.
  • Go back to Start --> Run... and enter Regsvr32 urlmon.dll and click OK again.
Restart the Internet Explorer and try accessing the affected SharePoint site again, the errors should be gone. We have put the above commands into a simple batch file available in our internal Knowledge Base and have not had to deal with this since:

@echo off
regsvr32 /s /u urlmon.dll
regsvr32 /s urlmon.dll

No comments: