PDA

View Full Version : [CLOSED] TypeError: l.createEvent is not a function - Firebug



Rosta
Jul 22, 2014, 10:53 AM
Hello,

please could anyone help me ?
During testing my programs in Firefox tool Firebug I have received " l.createEvent is not a function" - ext.axd?v=10682 (row 18).

This error appears after doubleclick to title of browser window (double-click action on a window title bar originally maximize/restore the window ). But in my program I do not use specific event script for this action.

All my programs created in 2.52 version Ext.Net indicate this error, but programs created in Ext 1.x not.

Thanks very much

Regards
Rosta

Daniil
Jul 22, 2014, 1:55 PM
Hi @Rosta,

Welcome to the Ext.NET forums!

It is hard to say what is going wrong. For the beginning let's do the following.


" l.createEvent is not a function" - ext.axd?v=10682 (row 18).

The error message leads me to think that there is the minified JavaScript code. For development and debugging it is better to use non-minified JavaScript code.

Please set this setting for a ResourceManager

ScriptMode="Development"
or globally in Web.config (in the <extnet> section)

scriptMode="Development"

Then, please, re-post the error message. Also a screenshot with the JavaScript code where the error occurs might be helpful.

Rosta
Jul 25, 2014, 11:41 AM
Hello Daniil,
thanks. After recommended settings I received this error specification


TypeError: doc.createEvent is not a function
var event = doc.createEvent('HTMLEvents');

Detail script

if (!Ext.isIE9m && document.createEvent) { // if (DOM compliant)
API = {
createHtmlEvent: function (doc, type, bubbles, cancelable) {
var event = doc.createEvent('HTMLEvents');

event.initEvent(type, bubbles, cancelable);
return event;
},

createMouseEvent: function (doc, type, bubbles, cancelable, detail,
clientX, clientY, ctrlKey, altKey, shiftKey, metaKey,
button, relatedTarget) {
var event = doc.createEvent('MouseEvents'),
view = doc.defaultView || window;


Thanks very much

Regards

Daniil
Jul 25, 2014, 2:44 PM
Thanks.

Hard to say what is going wrong.

Could you debug what the "doc" and its "createEvent" variables are?

If you can provide a standalone test case, steps to reproduce, specify the versions of Ext.NET and browser that it is reproducible with, we could also investigate it.

Rosta
Jul 29, 2014, 12:00 PM
Hello Daniil

thanks very much . It is possible to close it. I checked once more all java scripts and repaired some warnings and removed java srcipts from apsx file to js file. And now It is OK, but I do not know what was wrong.

Regards

Rosta

Daniil
Jul 29, 2014, 6:28 PM
I do not know what was wrong

Hard to say. If you can provide a runnable test case to reproduce the issue, I could look at.