by duffo64 » 19 May 2014 07:51
Done, thanks. The error appears on red line. It's a login form, and when I do CGJQEdit->SetFocus() the error appears. If I omit the setfocus, error goes away.
In this form I haven't additional JS code.
/* Safe SetFocus */
function SetFocusOnElement(element){
var $el;
if (typeof element == 'string'){
$el = $(document.getElementById(element));
} else if (element instanceof HTMLElement) {
$el = $(element);
} else { $el = element; }
if ((!$el) || (!$el.length)) { return }
if ($el.length > 1) {
$el = $el.get(0);
}
try {
$el.focus();
}
catch(err) {
// no exception
}
}