PDA

View Full Version : [CLOSED] owner.createDocument.createRange JS error



rakshith
19 Jun 2007, 2:20 AM
I am getting a javascript error on line 245 of the ext-core_debug.js file on IE. This happens when i use a combination of tab and dialog.

Here is the case,

<body>
some initial text here
<!---div for the TabPanel --->
<div ...>
</div>
some text here
<!--- div for the BasicDialog--->
<div ...>
</div>
</body>

IE throws an JS error in ext-core.js saying el.owner.createDocument.createRange Object doesn't support this property or method.

However, the interesting bit is that if I take off the initial text before the tab layout div, things work fine.

Can something be done for this? Is there a work around? I haven't been to get around this at all. An upgrade to the latest version did not help either.

Thanks!
Rak****h

jack.slocum
19 Jun 2007, 4:16 AM
This is an issue in IE where the first element of the body can't be a text node. A simple workaround is to place an empty span (or any tag) as the first child until we find a suitable workaround.

rakshith
19 Jun 2007, 11:30 PM
Thanks for the workaround Jack! That should do it until a solution is found.

vmorale4
18 Oct 2007, 5:51 PM
This is an issue in IE where the first element of the body can't be a text node. A simple workaround is to place an empty span (or any tag) as the first child until we find a suitable workaround.

FYI I found out that this problem also happens with malformed html where text before html tag exist.

allenerb
25 Jan 2008, 7:24 AM
FYI - I found another situation that can cause this to occur. I was adding a grid to an items collection of a panel and at the same time I had the html property set to a value. By getting rid of the html property, the error went away.



new Ext.Panel({
id:'middle-north-panel',
region:'north',
title:'MIDDLE-NORTH TITLE',
//html:'Middle-North Content', // Commenting this line out fixed the problem
layout:'fit',
height:'200',
split:true,
items:[aGrid] // having the items set with the html property above caused the createRange error (in IE only)
})


Allen

pulporitmo
24 Apr 2008, 4:36 AM
I use an HTML comment (<!-- Hello -->) instead of an span tag, only for being more unobtrusive.

wtff
25 Jun 2008, 1:21 AM
Hi, I came across this problem as well and wanted to report that inserting a comment doesn't work in my environment. (Vista + IE7.0.6001.18000). It needs to be a span element as Jack proposed.

BTW: I use a DOMHelper config to insert stuff and if I create an html fragment using the html config property like so:

html: <span />text
then the text node becomes a child node of the span element
If I write:

html: <span></span>text
then the text node becomes a sibling.

Is this a bug in extjs?

mystix
25 Jun 2008, 3:37 AM
<span> tags must be specified as a pair.

check the html specs.

gholyoak
4 Jul 2008, 5:24 AM
Hi Guys,

Im having a similiar problem and have searched the forums for a solution and although the concensus seems to be to add some sort of html tag at the beginning Im not sure how I can do this with my implementation

Basically I have an Ext.Window into which I want to load another Ext Component from an Ajax source.

(Example code attached)

This works a treat in FF but I have to get this working in IE as a proof-of-concept excerise for us to use EXT.

Any ideas

Sorry - just noticed this is EXT1.0 and Im using Ext 2.0 still any help wouldn't go amiss.

brian.moeskau
4 Jul 2008, 10:09 AM
I would suggest starting a new thread, as it is likely a different issue. Also please provide a better description about what your issue is.

gholyoak
4 Jul 2008, 11:29 AM
Hi Brian,

Thanks for quick reply, I'll post a new thread and expand the problem a bit.

Cheers

Gary

joelpietersen
29 Jan 2009, 8:25 PM
Yeah, same here, kinda realized that it happens with malformed html where text exists.