As an example, I have a page that lists all employees when loading. There is a button on the page that, when clicked, initializes (bootstrap) the modal form. I fill out the form and click "Submit." If the insert is successful, I return the json object as a response to add the newly created employee to the list - which is behind the modal - without refreshing the page.
Everything is working fine. I am returning json - and I am ready to send the data back to the parent window. I knew it would be a little complicated, but this SO post gave me hope .
JQuery
Employee.createEmployee(function (response) {
$(window.opener.document).find('#mytable').html($.parseJSON(response));
});
For now, all I can do is return this error:
Uncaught TypeError: Cannot read property 'document' of null
modal javascript data , :
JQuery
$('#createemployeebtn').click(function (event) {
$('#newemployeemodal').modal();
});
.