2
我有一个特定的统一警报包,它在跨浏览器以一致的方式提交时显示警报/通知。我发现在Autoform.hook()中提交后,默认的浏览器警报格式也会触发。任何帮助,以防止默认浏览器更改从射击,将不胜感激。 提交时流星阻止浏览器默认警报
我尝试过使用事件处理程序:event.preventDefault();
AutoForm.hooks({
'edit-form': {
onSuccess: function (operation, result, template) {
IonPopup.alert({
title: 'Saved Succesfully!',
subTitle: 'Please Click OK to go back',
onOk: function()
{
Session.set("editingReqEvent", null);
Router.go('calendar');
}
});
},
onError: function(operation, error, template) {
IonPopup.alert({title: 'Save Unsucessful!', subTitle: 'Please go back and check entries'});
console.log(error);
}
}
});
你已经显示的代码只是停止默认烧制而成提交事件。请显示更多代码。 – mwarren
是的你是对的。问题出现在提交之后。谢谢 – user3795286