This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
daftspunky
You can change the default behavior of an AJAX error from displaying an alert()
message, like this:
<script>
$(window).on('ajaxErrorMessage', function(event, message){
// This can be any custom JavaScript you want
alert('Something bad happened, mate, here it is: ' + message);
// This will stop the default alert() message
event.preventDefault();
})
</script>
Enjoy! :-)
AlecSPB
maxim.shvets9654 said:
How can I translate error messages to another language?
Yes, how we can?
andrepo18380
Brilliant @daftspunk.
Any preferred JS flash lib to use for the errors instead?
Cheers!
ilanfir18653
I like SweetAlert (my implementation here) but really depends on your needs. If you need a toast message try Toastr I didn't have the chance to use it but it looks promising. And there is always the simplest option of showing/hiding a div
1-8 of 8