I need to create a dialog with jQuery in a pretty big project. In some places, this project uses jquery wich version is different from the one I use recent for my window.
My code looks like this:
on ascx page
<html>
<head>
<link type="text/css" href="css/jquery-ui-1.8.22.custom.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.22.custom.min.js"></script>
<script type="text/javascript" src="js/myjQueryCode.js"></script>
</head>
<body>
</body>
</html>
in myjQueryCode.js file
$(document).ready(function() {
$("#dialog-form").dialog({
autoOpen: false,
height: 440,
width: 500,
modal: true,
closeOnEscape: false
});
});
At runtime, I get the error:
Microsoft JScript runtime error: Object doesn't support property or method 'dialog'
Thanks for your answers. The problem was that the library was included multiple times in different files.
The dialog method is from the jQuery UI library. It looks like you are using a custom version of jQuery UI, which may not include dialog.
You can customize which modules to include in jQuery UI here: http://jqueryui.com/download
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With