I got "Type is undefined" and "SP is undefined" message when I try to open the list form in sharepoint modal dialog. Could anyone help me to resolve this issue?
This is the code:
<script type="text/javascript" language="javascript" src="/_layouts/SPP.ContentDesigner/Scripts/SP.UI.Dialog.js"></script>
<script type="text/javascript">
//Handle the DialogCallback callback
function DialogCallback(dialogResult, returnValue){
}
//Open the Dialog
function OpenEditDialog(id) {
debugger;
var options = {
url:"http://devcd/Lists/NewTest/EditForm.aspx?ID=1&IsDlg=1",
width: 700,
height: 700,
dialogReturnValueCallback: DialogCallback
};
SP.UI.ModalDialog.showModalDialog(options);
}
</script>