Привет, у меня такой div.
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div id="PDialog">
<div id="PDialogPlaceHolder">
</div>
</div>
Теперь я хочу установить шаблон на этом диалоге, я делаю это
$("#PDialog").dialog(
{
bgiframe: true,
autoOpen: false,
height: 825,
width: 850,
position: 'top',
modal: true,
draggable: true,
title: Details',
open: function () {
// call ajax function to load the special quotes
InitpDialog(id);
},
close: function () {
}
});
function InitpreviewDialog(SRNumber) {
$.ajax({
url: '/Getdetail/GetPDetails',
contentType: "application/json; charset=utf-8",
data: { 'ID': id },
type: 'GET',
cache: false,
success: function (result) {
var placeHolder = $("#PreviewDialogPlaceHolder");
placeHolder.setTemplateURL("/Templates/cabPreviewDetails.htm");
placeHolder.processTemplate(result);
}
});
Я получаю объект не поддерживается ошибка, где ошибка.
Этот init:
$("#PDialog").dialog(
{
bgiframe: true,
autoOpen: false,
height: 825,
width: 850,
position: 'top',
modal: true,
draggable: true,
title: Details',
open: function () {
// call ajax function to load the special quotes
InitpDialog(id);
},
close: function () {
}
});
должны стать:
$("#PDialog").dialog(
{
bgiframe: true,
autoOpen: false,
height: 825,
width: 850,
position: 'top',
modal: true,
draggable: true,
title: 'Details', // SEE THE OPENING QUOTE ADDED ON THIS LINE
open: function () {
// call ajax function to load the special quotes
InitpDialog(id);
},
close: function () {
}
});
Но я не знаю точно, является ли это причиной вашей проблемы. По крайней мере, наверняка это опечатка. Добавлено здесь, а не в комментарии, было слишком много текста для вставки.
title: Details',
должно бытьtitle: 'Details',