Re: [Proto-Scripty] Re: document.write() vs Element/appendChild()

2009-12-12 Thread Frédéric
On samedi 12 décembre 2009, disccomp wrote: > A good reason to get out of the habit of using document.write, is that > it is NOT supported by XHTML.[1] > > [1] http://www.w3.org/MarkUp/2004/xhtml-faq#docwrite When using document.write() in XHTML documents, it clears the entire page and writes t

[Proto-Scripty] Re: document.write() vs Element/appendChild()

2009-12-11 Thread disccomp
A good reason to get out of the habit of using document.write, is that it is NOT supported by XHTML.[1] [1] http://www.w3.org/MarkUp/2004/xhtml-faq#docwrite -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, s

[Proto-Scripty] Re: document.write() vs Element/appendChild()

2009-12-11 Thread david
Hi All, I think that for an insertion of one element in the DOM (or a few numbers of elements), if you would keep reference to the element, it could be easier with DOM js methods. For cross browser insertion, innerHTML is now equivalent in all brothers, i think ::)) -- david On 11 déc, 05:04, Wal

Re: [Proto-Scripty] Re: document.write() vs Element/appendChild()

2009-12-10 Thread Walter Lee Davis
I believe that innerhtml is not completely guaranteed to work the same way across browsers, while the Prototype DOM methods are. Walter On Dec 10, 2009, at 10:02 PM, Rob Cluett wrote: > Why would we add an element using prototype's DOM method over > innerhtml in any scenario if we can use in

Re: [Proto-Scripty] Re: document.write() vs Element/appendChild()

2009-12-10 Thread Rob Cluett
Why would we add an element using prototype's DOM method over innerhtml in any scenario if we can use innerhtml and subsequently use $(element) to immediately retrieve a reference to it? I was told in the begining that innerhtml was the wrong way. Message sent from my Motorola Droid. On Dec 8, 20

[Proto-Scripty] Re: document.write() vs Element/appendChild()

2009-12-08 Thread david
Hi all, > I was under the impression that it would not actually be added to the DOM > when using innerhtml. And it therefore cannot be manipulated as a DOM > element. In fact, it's faster than any JS implementation, prototype or other. Browser are optimize to parse HTML string in an unbeatable w

Re: [Proto-Scripty] Re: document.write() vs Element/appendChild()

2009-12-07 Thread Frédéric
Le lundi 7 décembre 2009 15:22, Rob Cluett a écrit : > I was under the impression that it would not actually be added to the DOM > when using innerhtml. And it therefore cannot be manipulated as a DOM > element. I don't know, but in my case, I prefer using DOM, because it is easier to add featur

Re: [Proto-Scripty] Re: document.write() vs Element/appendChild()

2009-12-07 Thread Rob Cluett
I was under the impression that it would not actually be added to the DOM when using innerhtml. And it therefore cannot be manipulated as a DOM element. Message sent from my Motorola Droid. On Dec 7, 2009 7:26 AM, "david" wrote: Hi All, This is not the original question, but to insert elements

Re: [Proto-Scripty] Re: document.write() vs Element/appendChild()

2009-12-07 Thread Alex McAuley
cripty] Re: document.write() vs Element/appendChild() Le lundi 7 décembre 2009 11:00, Alex McAuley a écrit : > There is a known bug in IE8 regarding new Element and adding the class > toit in the scope... > > To overcome it simply use addClassName('My-Class'); after or instead o

Re: [Proto-Scripty] Re: document.write() vs Element/appendChild()

2009-12-07 Thread Rick Waldron
"Prototype & script.aculo.us" > <prototype-scriptaculous@googlegroups.com> > Sent: Monday, December 07, 2009 10:53 AM > Subject: [Proto-Scripty] Re: document.write() vs Element/appendChild() > > On Dec 4, 10:36 pm, fma <f...@gbiloba.org> wrote: > &

Re: [Proto-Scripty] Re: document.write() vs Element/appendChild()

2009-12-07 Thread Frédéric
Le lundi 7 décembre 2009 11:00, Alex McAuley a écrit : > There is a known bug in IE8 regarding new Element and adding the class > toit in the scope... > > To overcome it simply use addClassName('My-Class'); after or instead of > the scope Ok, thank you all for your help. I just added a call to ad

[Proto-Scripty] Re: document.write() vs Element/appendChild()

2009-12-07 Thread david
al Message - > From: "ColinFine" > To: "Prototype & script.aculo.us" > Sent: Monday, December 07, 2009 10:53 AM > Subject: [Proto-Scripty] Re: document.write() vs Element/appendChild() > > On Dec 4, 10:36 pm, fma wrote: > > Ok, I found something... &

Re: [Proto-Scripty] Re: document.write() vs Element/appendChild()

2009-12-07 Thread Alex McAuley
uot; To: "Prototype & script.aculo.us" Sent: Monday, December 07, 2009 10:53 AM Subject: [Proto-Scripty] Re: document.write() vs Element/appendChild() On Dec 4, 10:36 pm, fma wrote: > Ok, I found something... > > If I look at the HTML tree in the IE debugger, on the left panel I

[Proto-Scripty] Re: document.write() vs Element/appendChild()

2009-12-07 Thread ColinFine
On Dec 4, 10:36 pm, fma wrote: > Ok, I found something... > > If I look at the HTML tree in the IE debugger, on the left panel I > can't see any 'class' attribute. However, it does appear on the right > panel (called Attributs), with the correct value. But IE does not > seems to use it. I found

[Proto-Scripty] Re: document.write() vs Element/appendChild()

2009-12-06 Thread fma
So, does anybody understand why the full new-style element creation does not work well under IE? -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To uns

[Proto-Scripty] Re: document.write() vs Element/appendChild()

2009-12-05 Thread fma
I re-write my code using this syntax: this.mask = new Element('div'); this.mask.setAttribute('id', this._name + "_mask"); this.mask.setAttribute('class', "fullMask"); document.body.appendChild(this.mask); instead of: this.mask = new Element('div', {'id': this._name + "_mask", 'class': "fullMask"

[Proto-Scripty] Re: document.write() vs Element/appendChild()

2009-12-04 Thread fma
Ok, I found something... If I look at the HTML tree in the IE debugger, on the left panel I can't see any 'class' attribute. However, it does appear on the right panel (called Attributs), with the correct value. But IE does not seems to use it. I found that I can add an attribute to the div in the

[Proto-Scripty] Re: document.write() vs Element/appendChild()

2009-12-04 Thread fma
Very usefull site, thanks. Does someone have an idea of my problem? -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, se

[Proto-Scripty] Re: document.write() vs Element/appendChild()

2009-12-04 Thread Eric
When you have a large piece of code to post, it is nice to also post a link on pastie.org or jsbin.com. For example, I pasted the code you've posted on pastie here: http://pastie.org/727583 Eric On Dec 4, 8:09 am, fma wrote: > BTW, what is the tag to format code on this group? -- You receive

Re: [Proto-Scripty] Re: document.write() vs Element/appendChild()

2009-12-04 Thread Alex McAuley
There isn't one Alex Mcauley http://www.thevacancymarket.com - Original Message - From: "fma" To: "Prototype & script.aculo.us" Sent: Friday, December 04, 2009 7:09 AM Subject: [Proto-Scripty] Re: document.write() vs Element/appendChild() > BTW, what i

[Proto-Scripty] Re: document.write() vs Element/appendChild()

2009-12-03 Thread fma
BTW, what is the tag to format code on this group? -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to proto