Saturday, May 30, 2015

Object doesn't support property or method 'dialog'

Object doesn't support property or method 'dialog'

Suggestions:
Check the jquery file path if its relative url.
Check for multiple references of jquery js file in final html. If its invoked from multiple times from different jsps included in one page then it might cause this exception. Better to put its reference in one common jsp file and include it once in parent jsp.

In my case I had duplicate references to following js.
<script src="include/scripts/jquery-1.8.1.min.js"></script>

Also as observed this will be fine if you have duplicate inclusion in same jsp or html , but if there are multiple child jsps with jquery inclusion, this might cause the problem.

No comments:

Post a Comment