3
我想在colobox jquery上顯示我的html內容。 這裏im使用ajax函數來提交我的數據,但在成功函數中返回一些html頁面。現在我想在colorbox上顯示我的html內容。 我怎麼能做到這一點.. 我的代碼是這樣的:如何在colorbox上顯示html內容jquery
$('#submitButtonName').click(function(event) {
event.preventDefault();
alert("press");
var send=$("#ajaxadd").serialize();
alert(send);
$.ajax({
type:"POST",
url:"/patient_add",
data:send,
success: function(msg) {
$("#gg").html(msg);// here gg is the id which im try to retrieve from my html page. not getting exactly.
alert(msg);
//$(".display").colorbox({html:'<p>Hello</p>'});
}
});
$(".display").colorbox({html:send});
,這裏是我的html文件。我希望我的患者姓名,uhid,年齡顯示在colorbox上。
<body>
<div id="gg">
<form id="FormName11" action="/display" method="post" name="FormName11">
<table>
<tr><div align="center"><h2><b><u>Fortis-Medremind Patient Receipt</u></b><h2></div></tr>
</table>
<table>
<b>PatientName</b>: {{patientinfo_all.name}}
<br>
<b>UHid</b> : {{patientinfo_all.uhid}}
<br>
<b>Age</b> : {{patientinfo_all.age}}
<br>
</form>
</div>
感謝名單提前..