我想显示一个html页面,该页面使用jquery-ui对话框保存在字符串中。不幸的是没有对话框打开。
这是我的代码:
$(failedRequest.responseText).dialog();
js控制台中的错误消息显示:
Uncaught TypeError: Cannot read property 'display' of undefined
我也试过
$('<html><body><h1>A title</h1>And some text.</body></html>').dialog();
工作正常。
我认为HTML代码中存在导致.dialog()
失败的内容。这是complente HTML代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title>EAI Configuration Web :: Status page</title>
<link href="/EAIConfig/styles/design.css" rel="stylesheet" type="text/css" media="all" />
<link href="/EAIConfig/styles/print.css" rel="stylesheet" type="text/css" media="print" />
<link rel="shortcut icon" type="image/x-icon" href="/EAIConfig/img/favicon.ico" />
<link rel="icon" type="image/x-icon" href="/EAIConfig/img/favicon.ico" />
<script type="text/javascript">
function onChangeAutoSessionClose() {
var checked = document.getElementById('autoSessionClose').checked;
$.post("autoSessionClose.action", {autoSessionClose: checked});
};
</script>
</head>
<body id="page-home">
<div id="maincontainer">
<div id="header">
<div class="headerTop">
<div class="logo">
<img src="/EAIConfig/img/galenicaLogo.gif"
title="" />
</div>
<div id="blockMainPopup" style="float:right">
<form id="logout" name="logout" action="logout" method="post">
<a class="item" href="javascript:print()"><img
src="/EAIConfig/img/iconPrint.gif"
alt="Print Page" /> title.print</a>
login.as : ugxnbpluse
<input type="submit" id="logout_logout" name="action:logout" value=""/>
</form>
</div>
<div class="row"></div>
</div>
</div>
<div id="content">
<div class="leftcontent">
<br/>
<ul>
title.mappingDefinition
<li> <a href="/EAIConfig/ri/i18n/mappingDefinition.action">title.mapping</a></li>
<li>
<a href="/EAIConfig/ri/i18n/businessServiceDefinition.action">title.businessServiceDefinition</a></li>
<li> <a href="/EAIConfig/ri/i18n/dataStoreEntity.action">title.dataStoreEntity</a></li>
<li> <a href="/EAIConfig/ri/i18n/valueConversion.action">title.valueConversion</a></li>
<li> <a href="/EAIConfig/ri/i18n/schemaConfiguration.action">title.conditionalValueConversion</a></li>
</ul>
<br/>
<ul>
title.messageTypeDefinition
<li>
<a href="/EAIConfig/ri/i18n/taskMessageTypeDefinition.action">title.taskMessageType</a></li>
<li> <a href="/EAIConfig/ri/i18n/messageTypeDefinition.action">title.messageType</a></li>
<li> <a href="/EAIConfig/ri/i18n/outputConfiguration.action">title.outputConfiguration</a></li>
<li> <a href="/EAIConfig/ri/i18n/configurationHeader.action">title.configurationHeader</a></li>
<li>
<a href="/EAIConfig/ri/i18n/startTaskContentElement.action">title.startTaskContent</a></li>
</ul>
<br/>
<ul>
title.administration
<li>
<a href="/EAIConfig/ri/i18n/contractorDefinitions.action">title.contractorDefinition</a>
</li>
<li>
<a href="/EAIConfig/ri/i18n/viewPartnerGroupList.action">title.partnerGroupList</a>
</li>
<li>
<a href="/EAIConfig/ri/i18n/viewHolidayCalendar.action">title.holidayCalendar</a>
</li>
<li>
<a href="/EAIConfig/ri/i18n/exportImport.action">title.exportImport</a>
</li>
<li>
<a href="/EAIConfig/ri/i18n/lastChange.action">title.lastChange</a>
</li>
<li>
<a href="/EAIConfig/ri/i18n/translation.action">title.translation</a>
</li>
</ul>
<br/>
<ul>
title.reports
<li>
<a href="/EAIConfig/ri/i18n/viewPartnerReports.action">title.reports.partner</a>
</li>
</ul>
</div>
<div class="rightcontent">
<div id="pagetitle">
<h1>
title.eaiConfiguration
-
Status page
</h1>
<h2>
</h2>
</div>
<div class="row">
</div>
<br/><br/><br/>
<p style="font-size: 1.2em;font-weight: bold;margin: 1em 0px;">Internal Server Error</p>
<p>Internal Server Error</p>
<p>You can get technical details <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1">here</a>.<br>
Please continue your visit at our <a href="/">home page</a>.
</p>
</div>
</div>
</div>
</body>
</html>
有关如何在对话框中显示此HTML的任何想法?