0
嗨,我有這樣的div。如何在jquery中設置模板
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div id="PDialog">
<div id="PDialogPlaceHolder">
</div>
</div>
現在我想設置的模板在這個dialig,我做這樣的
$("#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);
}
});
我越來越不支持的對象錯誤,哪裏是錯誤的。
小心打開/關閉引號:'title:Details','應該是'title:'Details',' –
Where?我沒有得到你。請告訴我 – Naruto