Free Support Forum -

JavaScript runtime error: Unable to get property 'prototype' of undefined or null reference


The undefined or null reference is the $.ui.groupdocsViewer object. My Jquery and JqueryUI references are in place. Are there any common mistakes that would cause this error?

This is an MVC project using VS 2013.


Hello Mark,

We are sorry to hear that you have this issue. Unfortunately we cannot solve this issue without additional details. Please give us:
1. Source code of the GroupDocs.Viewer widget.
2. Source code of the HEAD block, where GroupDocs.Viewer script load block (@Html.CreateViewerScriptLoadBlock()) is situated.
3. Screenshot of the error.

Also please make sure that there is no conflict between scripts, included via @Html.CreateViewerScriptLoadBlock(), and other scripts, which are present on the page. In particular, when specifying @Html.CreateViewerScriptLoadBlock(), GroupDocs.Viewer includes jQuery, jQuery UI and Knockout.js to the page. And if you’re specifying the same JavaScript libraries, there may be a conflict.

Thanks and waiting for your reply.