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

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

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
IMO, this is bad practice. $(element).insert('
');  -- Sent from my Palm Prē david wrote: Hi All, This is not the original question, but to insert elements in the DOM, you should do: $('myContent').innerHTML='
' It's faster in execution than creating an eleme

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

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

2009-12-07 Thread Alex McAuley
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 Alex Mcauley http://www.thevacancymarket.com - Original Message - From: "ColinFine" To: "Prototype & script.acu

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 is the tag to format code on this