How to open a modal popup?
How to open a modal popup?
Dear all,
Dear all,
I am using data table to render the data to a table. It's working fine.
The data that is rendered has got a hyper link, on click of hyper link i want to open a modal popup with one of the column value.
How can I do that?
Following is my code
function loaddata() {
var SelectedValue = $("#ddl").val();
//alert("hi");
$.ajax({
type: "POST",
url: '../W1.asmx/GetDetails',
data: '{"id": "' + SelectedValue + '"}',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: ServiceSucceeded,
error: function (xmlHttpRequest, textStatus, errorThrown) {
alert('Service call failed: ' + xmlHttpRequest.responseText + ' ' + textStatus);
}
});
}
function ServiceSucceeded(result) {
var resultObject = $.parseJSON(result.d);
$('#demo').html('
');
oTable = $('#example').dataTable({
data: resultObject,
deferRender: true,
searching: true,
order: [[1, "desc"]],
aoColumns: [
{ "data": "id", "title": "id" },
{ "data": "des", "title": "des" },
{
"sName": "id",
"mRender": function (data, type, full) { var code_id = full[0]; return "<a href='a.aspx?code_id=" + code_id + "'>Display</a>"; }
}
]
});
}
Thanks
Deepak.V