I'm trying to do very simple thing: when user changes the value of the dropdown list I'd like to display the confirmation. I've tried doing this:
change: function () {
return confirm("Czy chcesz zapisać tę zmianę?");
}
and the same thing using e.preventDefault()
but the value still gets updated.
Any ideas how can I do this?
Use the select
event instead. Select
happens before the change, and change
happens after the value has already been changed.