I have followed the instructions for a SaveAs dialog and it works like a charms
EXCEPT...
If the user cancels, I have some code that needs to execute. However the cancel event doesn't trigger the change event.
So How can I respond to the cancel of the file saveas dialog?
function openSaveAs(prompt, cb) {
var saver = $('#saveAsFileDialog');
saver.attr('nwsaveas', prompt);
saver.unbind('change');
saver.val("");
saver.bind('change', function (evt) {
if(cb) cb($(this).val());
});
saver.trigger('click');
}
I have followed the instructions for a SaveAs dialog and it works like a charms
EXCEPT...
If the user cancels, I have some code that needs to execute. However the cancel event doesn't trigger the change event.
So How can I respond to the cancel of the file saveas dialog?
function openSaveAs(prompt, cb) {
var saver = $('#saveAsFileDialog');
saver.attr('nwsaveas', prompt);
saver.unbind('change');
saver.val("");
saver.bind('change', function (evt) {
if(cb) cb($(this).val());
});
saver.trigger('click');
}