CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

JS errors

General discussion

by duffo64 » 17 May 2014 15:44

Hi guys,

in 2.1.0.3609 and 2.1.0.3619 an error appears in IE8:

'HTMLElement' is undefined at line 24, character 31 in cg.jquery.helper.min.js

Thanks

Claudio
duffo64
 
Posts: 43
Joined: 05 Nov 2013 07:38

by Jorge Sousa » 17 May 2014 17:33

Hi

Put ServerController.JavascriptOptions = (true,true)

Run your app, in browser debug mode, and check debug stack pane, to know where it cames from.

Most of the times is because user javascript
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

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
}
}
duffo64
 
Posts: 43
Joined: 05 Nov 2013 07:38

by Alexander Bulei » 19 May 2014 10:02

Hi duffo64,

Thanks.

Improved/Fixed in V2.1.0.3621

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by duffo64 » 19 May 2014 15:27

Gr8 !
duffo64
 
Posts: 43
Joined: 05 Nov 2013 07:38


Return to General - Archive

Who is online

Users browsing this forum: No registered users and 3 guests

Contact Us.