PDA

View Full Version : TreeNodeUI - img tags not closed



mujahid
15 Jul 2007, 6:45 PM
I am getting an error (An invalid or illegal string was specified" code: 12, line 270, ext-all-debug.js) when rendering a tree node in firefox when using xhtml - (mime type of application/xhtml+xml).

In ExtJS 1.1 RC1, TreeNodeUI.js, I noticed that the img tags are not properly closed in the renderElements function on line 378 and 379;


var buf = ['<li class="x-tree-node"><div class="x-tree-node-el ', a.cls,'">',
'<span class="x-tree-node-indent">',this.indentMarkup,"</span>",
'<img src="', this.emptyIcon, '" class="x-tree-ec-icon">',
'<img src="', a.icon || this.emptyIcon, '" class="x-tree-node-icon',(a.icon ? " x-tree-node-inline-icon" : ""),(a.iconCls ? " "+a.iconCls : ""),'" unselectable="on">',
cb ? ('<input class="x-tree-node-cb" type="checkbox" ' + (a.checked ? 'checked="checked">' : '>')) : '',
'<a hidefocus="on" href="',a.href ? a.href : "#",'" tabIndex="1" ',
a.hrefTarget ? ' target="'+a.hrefTarget+'"' : "", '><span unselectable="on">',n.text,"</span></a></div>",
'<ul class="x-tree-node-ct" style="display:none;"></ul>',
"</li>"];

After properly closing them in my local environment, the tree was rendered properly.

Thanks,

Mujahid

jack.slocum
16 Jul 2007, 4:15 AM
"img tags are not properly closed"

The markup is the correct markup for HTML documents. However, since HTML is forgiving of XHTML tag closing so we always try to include them. ;)

This will be updated in the next release. Thanks for reporting.

erchan_2000
27 Oct 2007, 10:32 PM
Looks like the problem (probably not the same) is happening in Ext2.0 Beta1

I ran the Desktop demo with Firefox 2.0.0.8 and the Accordion Window does not render the TreePanel with the treenodes filled in.

I'm getting the exact same error as mentioned (invalid string error, code 12).

I also noticed when I'm running Safari 3 beta on MAC/XP, and the desktop taskbar doesn't render as well. Everything seems to work on IE7 though.

I was wondering if I'm missing something on the browser side. Is there like a switch I need to enable/disable?

It's hard to debug my work using IE browser. Firebug really helps in debugging my JScripts.

thanks!

mystix
27 Oct 2007, 11:18 PM
Looks like the problem (probably not the same) is happening in Ext2.0 Beta1

I ran the Desktop demo with Firefox 2.0.0.8 and the Accordion Window does not render the TreePanel with the treenodes filled in.

I'm getting the exact same error as mentioned (invalid string error, code 12).

I also noticed when I'm running Safari 3 beta on MAC/XP, and the desktop taskbar doesn't render as well. Everything seems to work on IE7 though.

I was wondering if I'm missing something on the browser side. Is there like a switch I need to enable/disable?

It's hard to debug my work using IE browser. Firebug really helps in debugging my JScripts.

thanks!

pls start a new thread for this issue in the 2.x Bugs Forum with a link back to this thread. thanks.