use window.confirm instead