View Full Version : [CLOSED] Javascript error when running ext.net code in IE9 iframe

Jun 17, 2013, 3:22 PM
I have an issue running ext.net in iframe in IE 9 browser only. It works fine in other browsers and in IE 9 as standalone, not iframe.


Any thoughts?

Jun 17, 2013, 4:24 PM
Code what is fire an error:

return g.createElement("<rvml:"+e+' class="rvml">')

Jun 17, 2013, 4:56 PM
Hi @livehealthierGF,

What is the iframe's content?

Could you, please, provide a test case?

Jun 17, 2013, 4:59 PM
Looks like bug in sencha code:

render: function (container) {
var me = this,
doc = Ext.getDoc().dom;
// VML Node factory method (createNode)
if (!me.createNode) {
try {
if (!doc.namespaces.rvml) {
doc.namespaces.add("rvml", "urn:schemas-microsoft-com:vml");
me.createNode = function (tagName) {
return doc.createElement("<rvml:" + tagName + ' class="rvml">');
} catch (e) {
me.createNode = function (tagName) {
return doc.createElement("<" + tagName + ' xmlns="urn:schemas-microsoft.com:vml" class="rvml">');

if (!me.el) {
var el = doc.createElement("div");
me.el = Ext.get(el);

// Measuring span (offscrren)
me.span = doc.createElement("span");
me.el.setSize(me.width || 10, me.height || 10);
scope: me,
mouseup: me.onMouseUp,
mousedown: me.onMouseDown,
mouseover: me.onMouseOver,
mouseout: me.onMouseOut,
mousemove: me.onMouseMove,
mouseenter: me.onMouseEnter,
mouseleave: me.onMouseLeave,
click: me.onClick

doc.createElement("<rvml:" + tagName + ' class="rvml">');

should be replaced by:

var lh_rvm = g.createElement("rvml"); lh_rvm.className = "rvml";

Is it any way to submit and get it fix by sencha?

Jun 17, 2013, 5:01 PM
How to overload method render method?

Jun 17, 2013, 5:29 PM
Please clarify, do you have such issue with online samples (http://examples.ext.net (http://examples2.ext.net/) , all online samples are opened in the seperate iframe)

Jun 17, 2013, 6:03 PM
Please clarify, do you have such issue with online samples (http://examples.ext.net (http://examples2.ext.net/) , all online samples are opened in the seperate iframe)

No issues with examples. Trying to do something like this on my page:

Ext.define('App.patch.Ext.draw.engine.VML', {
requires: [
}, function () {

render: function (a) {
var c = this, g = Ext.getDoc().dom, b;
if (!c.createNode) {
try {
if (!g.namespaces.rvml) {
g.namespaces.add("rvml", "urn:schemas-microsoft-com:vml");
c.createNode = function (e) {
var lh_rvm = g.createElement("rvml:" + e);
lh_rvm.className = "rvml";
return lh_rvm;
} catch (d) {
c.createNode = function (e) {
var lh_rvm = g.createElementNS("urn:schemas-microsoft.com:vml", e);
lh_rvm.className = "rvml";
return lh_rvm;
} if (!c.el) {
b = g.createElement("div");
c.el = Ext.get(b);
c.span = g.createElement("span");
c.el.setSize(c.width || 0, c.height || 0);
c.el.on({ scope: c, mouseup: c.onMouseUp, mousedown: c.onMouseDown, mouseover: c.onMouseOver, mouseout: c.onMouseOut, mousemove: c.onMouseMove, mouseenter: c.onMouseEnter, mouseleave: c.onMouseLeave, click: c.onClick, dblclick: c.onDblClick });

but looks like error happened before my code. Is it any way to override it?

Jun 17, 2013, 6:09 PM
It seems that your browser cannot parse ExtJS file, in this way you cannot override it because ExtJS resources are loaded first
I am not sure whats wrong because I cannot reproduce the issue (and you cannot reproduce with our online samples)

I guess that your webserver somehow modify resources (may be some IIS modules or your own http modules/filters)
Can you provide online sample to test it?

Jun 17, 2013, 8:37 PM
Just compared standalone and iframe version, looks like it standalone version generate svg chart:

<svg id="ext-gen1178" style="width: 275px; height: 225px;" width="275" height="225" xmlns="http://www.w3.org/2000/svg" version="1.1">

but somehow iframe(ie9) version generates IE8 version of chart:

<div class=" x-vml-base" id="ext-gen1178" style="width: 275px; height: 225px;">
<shape class="rvml x-vml-sprite" id="ext-sprite-1173" style="z-index: 0;">

Jun 17, 2013, 10:12 PM
Found the issue. If you do not set <!DOCTYPE html> on page on IE9 in iframe it render page in quirks mode, what is brake functionality. Added doctype and everything works fine. You can close the topic