I'm guessing that XUL does not use the same renderer. But it does use a fairly standard one: innerHTML. When I use the pleonastically verbose DOM method:
{{{ document.getElementById('todo-list').innerHTML = 'BAAAAAAR'; }}} Everything works fine. I suppose I would have to hack the jQuery library to not do anything too special with it's dom manipulation... Weeeeeeee. I would really like a way to have jQuery be compatible for XUL, as development with it is a snap! -Carl On Dec 18, 2007 11:37 AM, Jeffrey Kretz <[EMAIL PROTECTED]> wrote: > > Although I have minimal familiarity with XUL in FF, my first thought would > be that the core javascript functions may possibly operate differently > with > XUL. > > For example, see Koch's site on cross-platform compatibility with > different > javascript functions in different browsers, such as > http://www.quirksmode.org/dom/w3c_core.html > > I wonder if the FF XUL renderer uses the same exact javascript > implementation as its HTML renderer? This could affect the core jQuery > library, as to how it parses elements and adds them to the DOM. > > JK > > -----Original Message----- > From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of phocis > Sent: Tuesday, December 18, 2007 4:58 AM > To: jQuery (English) > Subject: [jQuery] XUL jQuery-1.2.1 html manipulation issue > > > jQuery seems to have an issue with manipulating html when in a XUL > document. > > The following code ( yes, the jquery is loaded, hence the > alert(jQuery)) crashes somewhere (there is no easy way of including > firebug in XUL) when processing the .html or .append functions and > blanks out the element. > > It should change from FOOOOOO to BAAAAAAR when the button is clicked. > But as it is, it only clears the target out. > > This sucks because I would really like to use jQuery in my XUL app for > ajax and ui manipulation. > > -Carl > > > {{{ > <?xml version="1.0"?> > <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> > > <window > id="main" > title="ToDo" > width="300" > height="300" > xmlns:html="http://www.w3.org/1999/xhtml" > > xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" > style="margin:0;"> > <html:script src="jquery-1.2.1.min.js"/> > <toolbox flex="1" style="margin:0;"> > > <html:div > id="todo-list" > style="background:#F0F0F0;" > flex="1"> > FOOOOOOOOOOO > </html:div> > > <html:script> > function replaceText(){ > alert(jQuery); > $('#todo-list').html('BAAAAAAAAR'); > } > </html:script> > > <menubar id="sample-menubar"> > <button label="CLICKME" > oncommand="replaceText()"/> > </menubar> > </toolbox> > </window> > }}} > > > > >