I have recently changed from using the cassini development server to IIS 7.5 express, and have found that on some pages my javascript is throwing ‘Object doesn’t support this property or method’ exceptions.
All the pages share the same masterpage which loads all the plugins, and when debugging in the browser the scripts seem to be available.
One particular example is
$(document).ready(function () {
var dlg = $('#<%=PanelAddToList.ClientID%>').dialog({ autoOpen: false, modal: true });
// $('#<%=PanelAddToList.ClientID%> .List-Add').click(function () { __doPostBack('<%=BtnAddToList.UniqueID%>', ''); });
$('#<%=PanelAddToList.ClientID%> .dialog-button-cancel').click(function () { $('#<%=PanelAddToList.ClientID%>').dialog('close'); });
dlg.parent().appendTo(jQuery("form:first"));
});
This is contained in a usercontrol which has PanelAddToList in it. This control works on some pages using IIS but on others it will cause an exception on the ‘var dlg =’ … line.
If i switch back to using cassini it all works normally.
Any help would be appreciated, thank you
check if jquery load before not because this type of error occur when they did not find any object.
i think in you case dialog have some error, page can’t find dialog method or arguments..