I was thinking that this should work: var el = Builder.node(''div'',{id:''one''},[ Builder.node(''h3'',{id:''two''},''another header'',[ Builder.node(''div'',{id:''content''},''more content'') ]), ]); new Insertion.Bottom(''contentblock'', el); However, it produces the following error in Firebug: content.stripScripts is not a function - prototype.js (line 1340) Any experience/advice will be greatly appreciated! Thanks, Ian --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---
On 9/8/06, Ian Tyndall <ityndall-ue636x8T32g@public.gmane.org> wrote:> > I was thinking that this should work: > > var el = Builder.node(''div'',{id:''one''},[ > Builder.node(''h3'',{id:''two''},''another header'',[ > Builder.node(''div'',{id:''content''},''more content'') > ]), > ]); > new Insertion.Bottom(''contentblock'', el); > > > However, it produces the following error in Firebug: > > content.stripScripts is not a function - prototype.js (line 1340) >Can you post a complete but very short html page that shows this problem in action? Peter --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> I think Insertion.Bottom isn''t for direct element insertion. It is for text or HTML insertion (i.e. el.innerHTML +=''<div id="one"><h3>...</h3></div>'';). <br> For DOM insertion like you''re trying, do something like:<br> var parent = $(''contentblock'');<br> parent.insertBefore(el, parent.lastChild.nextSibling);<br> <br> I''m not 100% sure that''ll work like you want but you get the idea.<br> <br> Colin<br> <code></code><br> Ian Tyndall wrote: <blockquote cite="mid45023712.9010905-ue636x8T32g@public.gmane.org" type="cite"> <pre wrap="">I was thinking that this should work: var el = Builder.node(''div'',{id:''one''},[ Builder.node(''h3'',{id:''two''},''another header'',[ Builder.node(''div'',{id:''content''},''more content'') ]), ]); new Insertion.Bottom(''contentblock'', el); However, it produces the following error in Firebug: content.stripScripts is not a function - prototype.js (line 1340) Any experience/advice will be greatly appreciated! Thanks, Ian </pre> </blockquote> <br> --~--~---------~--~----~------------~-------~--~----~<br> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. <br> To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <br> To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <br> For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs <br> -~----------~----~----~----~------~----~------~--~---<br> </body> </html> <br>
Haha, I think I made that more complicated than it had to be.. $(''contentblock'').appendChild(el); Ian Tyndall wrote:> I was thinking that this should work: > > var el = Builder.node(''div'',{id:''one''},[ > Builder.node(''h3'',{id:''two''},''another header'',[ > Builder.node(''div'',{id:''content''},''more content'') > ]), > ]); > new Insertion.Bottom(''contentblock'', el); > > > However, it produces the following error in Firebug: > > content.stripScripts is not a function - prototype.js (line 1340) > > Any experience/advice will be greatly appreciated! > > Thanks, > Ian > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---
I too made it more complicated than it had to be, thanks for pointing that out!>Haha, I think I made that more complicated than it had to be.. > >$(''contentblock'').appendChild(el); > >Ian Tyndall wrote: > > >>I was thinking that this should work: >> >> var el = Builder.node(''div'',{id:''one''},[ >> Builder.node(''h3'',{id:''two''},''another header'',[ >> Builder.node(''div'',{id:''content''},''more content'') >> ]), >> ]); >> new Insertion.Bottom(''contentblock'', el); >> >> >>However, it produces the following error in Firebug: >> >>content.stripScripts is not a function - prototype.js (line 1340) >> >>Any experience/advice will be greatly appreciated! >> >>Thanks, >>Ian >> >> >> >> >> >> >> > > >> > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---