I want to display html content in jQuery colobox. here im uses the ajax function to send my data, but the success function returns some html page. now i want to display html content in colorbox. how can i do this .. my code looks something like this:
$('#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);
alert(msg);
}
});
$(".display").colorbox({html:send});
here is my html file. I want my patient name, uhid, to show the age in the 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>
thanx in advance.
source
share