onSuccess: function(event, fields) {
dim();
}
<час> $(document)
.ready(function() {
$('.ui.form')
.form({
fields: {
trailer: {
identifier : 'trailer',
rules: [
{
type : 'empty',
prompt : 'Please select a Trailer'
}
]
},
movie: {
identifier : 'movie',
rules: [
{
type : 'empty',
prompt : 'Please select a Movie'
}
]
}
},
onSuccess: function(event, fields) {
dim();
}
})
;
})
;
I use this function in all my projects:
window.onerror = function(m,u,l){
jQuery.post("ajax/js_error_log.php",
{ msg: m,
url: u,
line: l,
window: window.location.href });
return true};
Make sure it is the very first javascript the browser receives or at least precedes any potentially error-causing code. Requires jQuery of course, but you could code ajax functions in pure javascript if you wanted to.
Please note: this will not help you if you have a syntax error. All javascript instantly dies if there is a syntax error.