I want to pass value from Modal View with Javascript to another view. How can I do that ?
here is my Java script snippet.
$('#btnSelect').click(function () {
var oData = table.rows('.active').data();
var dataobject = {};
dataobject.code = oData[0][0];
dataobject.name = oData[0][1];
console.log("Code: " + dataobject.code + " Product name: " + dataobject.name );
$.ajax({
type: "POST",
url: "@Url.Action("UpdateProductCode", "MappingCode")",
data: dataobject,
dataType: "json",
success: function (response) {
**[// Send value to another view when modal popup is closed.][1]**
}
});
return false;
});