0
我有一个带有XHTML标记的页面,也正确地用作XHTML。有一个链接,如果点击打开一个jQuery UI对话框,并在对话框中加载另一个XHTML页面的内容。为什么我不能在XHTML页面的对话框中打开XHTML内容?
问题是内容没有加载到对话窗口内。
解决此问题的方法是通过以HTML(text/html mime类型)的形式提供主要的XHTML页面(从中打开对话框)。
这是为什么?为什么不能正确使用XHTML?
这里是我的代码:
function openDialogByUri(div, uri, title, width, height, buttonsArray) {
div.dialog({
title: title,
width: width,
height: height,
position: 'middle',
resizable: false,
buttons: buttonsArray
});
$.ajax({
url: uri,
success: function(response) {
div.html(response);
},
error: function(response) {
alert(response);
}
});
}