Closed Viveksubramani closed 9 years ago
You can do this from inside the modal:
document.getElementsByTagName('form')[0].addEventListener(function(e) {
e.preventDefault();
//send the form data
var req = new XMLHttpRequest();
req.send(new FormData(this));
//or return some input field value
returnValue = document.getElementsByTagName('input')[0].value;
parent.document.getElementsByTagName('dialog')[0].close();
});
i have a form in the dialog and i wanted to close the dialog after I submitted it. Is it possible?