how can i do this with prototype?! ____________ Virus checked by G DATA AntiVirusKit Version: AVK 17.7503 from 08.09.2007 Virus news: www.antiviruslab.com --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
several ways...but before i answer I would like to point you to a couple of references http://www.prototypejs.org/api http://thinkweb2.com/projects/prototype-checklist/ now the best way to do it is $(''element_id'').update(''something cool'') because you can chain stuff together (the example is in the second link) but sometimes i have found that for some reason update() doesn''t work (not sure why, but often doesn''t really matter) in which case i fall back to $(''element_id'').innerHTML = "something else cool, but not quite as cool" On 9/8/07, retacom-Mmb7MZpHnFY@public.gmane.org <retacom-Mmb7MZpHnFY@public.gmane.org> wrote:> > > how can i do this with prototype?! > > ____________ > Virus checked by G DATA AntiVirusKit > Version: AVK 17.7503 from 08.09.2007 > Virus news: www.antiviruslab.com > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
thats why i said to read the second link that somehow managed to stay all on one line http://thinkweb2.com/projects/prototype-checklist/ the reason its cooler is because you can chain commands in a line, ala the above link: with the not quite as cool method you can''t do: $(''coolestWidgetEver'').update(''some nifty content'').addClassName(''highlight'').next().hide() as for the technical reason, I can''t really answer that, and i should have qualified my statement with based on my own experiences update() doesn''t always work. On 9/8/07, DonTimo <timo323-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > Sorry, I''m a newbie to prototype and i was wondering.. > why is $(''element_id'').update("more cool") than $ > (''element_id'').innerHTML = "is" > esp considering that sometimes it doesn''t work... > > > On Sep 8, 3:57 pm, "Brian Williams" <brianw1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > several ways...but before i answer I would like to point you to a couple > of > > references > > > > > http://www.prototypejs.org/apihttp://thinkweb2.com/projects/prototype-checklist/ > > > > now the best way to do it is $(''element_id'').update(''something cool'') > > because you can chain stuff together (the example is in the second link) > > > > but sometimes i have found that for some reason update() doesn''t work > (not > > sure why, but often doesn''t really matter) in which case i fall back to > > $(''element_id'').innerHTML = "something else cool, but not quite as cool" > > > > On 9/8/07, reta...-Mmb7MZpHnFY@public.gmane.org <reta...-Mmb7MZpHnFY@public.gmane.org> wrote: > > > > > > > > > > > > > how can i do this with prototype?! > > > > > ____________ > > > Virus checked by G DATA AntiVirusKit > > > Version: AVK 17.7503 from 08.09.2007 > > > Virus news:www.antiviruslab.com- Hide quoted text - > > > > - Show quoted text - > > > > >--~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Please refer to the online documentation: http://prototypejs.org/api/element/update If you have found a bug, please report it: http://prototypejs.org/contribute Thanks. Tobie On Sep 9, 7:26 am, "Nicolás Sanguinetti" <godf...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Technically, the only difference I''m aware is that using update solves > problems in Internet Explorer, where changing the innerHTML of certain > table elements has no effect, while Element.update works around those > fine. > > Best, > -Nicolas > > On 9/9/07, Brian Williams <brianw1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > thats why i said to read the second link that somehow managed to stay all on > > one line > > >http://thinkweb2.com/projects/prototype-checklist/ > > > the reason its cooler is because you can chain commands in a line, ala the > > above link: > > with the not quite as cool method you can''t do: > > > $(''coolestWidgetEver'').update(''some nifty > > content'').addClassName(''highlight'').next().hide() > > > as for the technical reason, I can''t really answer that, and i should have > > qualified my statement with based on my own experiences update() doesn''t > > always work. > > > On 9/8/07, DonTimo <timo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Sorry, I''m a newbie to prototype and i was wondering.. > > > why is $(''element_id'').update("more cool") than $ > > > (''element_id'').innerHTML = "is" > > > esp considering that sometimes it doesn''t work... > > > > On Sep 8, 3:57 pm, "Brian Williams" <brianw1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > several ways...but before i answer I would like to point you to a couple > > of > > > > references > > >http://www.prototypejs.org/apihttp://thinkweb2.com/projects/prototype... > > > > > now the best way to do it is > > $(''element_id'').update(''something cool'') > > > > because you can chain stuff together (the example is in the second link) > > > > > but sometimes i have found that for some reason update() doesn''t work > > (not > > > > sure why, but often doesn''t really matter) in which case i fall back to > > > > $(''element_id'').innerHTML = "something else cool, but not quite as cool" > > > > > On 9/8/07, reta...-Mmb7MZpHnFY@public.gmane.org <reta...-Mmb7MZpHnFY@public.gmane.org > wrote: > > > > > > how can i do this with prototype?! > > > > > > ____________ > > > > > Virus checked by G DATA AntiVirusKit > > > > > Version: AVK 17.7503 from 08.09.2007 > > > > > Virus news:www.antiviruslab.com-Hide quoted text - > > > > > - Show quoted text ---~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---