Hi everybody,
I have a list of words (<ul><li>...). When I click on one of them, a
new sub list show at the bottom of clicked element.
So I''d like to call ajax.updater correctly to show sublist under
clicked element (var m in javascript code).
This is my incorrect code:
new Ajax.Updater(''respuesta'',
''/search/similar_items'',
{asynchronous:true, evalScripts:false, insertion:Insertion.Bottom(m,
null)});
Insertion.Bottom has 2 parameters: element and html code. m is a
javascript variable that contains a reference to element, but html
code will be returned at Ajax.updater,
Could anybody help me?
Thanks in advance
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
When you pass the insertion to Updater, you just have to pass which
insertion to use, the variables are inferred from the output of the
updater.
//untested!!
new Ajax.Updater(''m'',
''/search/similar_items'',
{asynchronous:true, evalScripts:false, insertion:Insertion.After});
Walter
On Oct 16, 2007, at 7:07 AM, symfo wrote:
>
> Hi everybody,
>
> I have a list of words (<ul><li>...). When I click on one of
them, a
> new sub list show at the bottom of clicked element.
> So I''d like to call ajax.updater correctly to show sublist under
> clicked element (var m in javascript code).
>
> This is my incorrect code:
>
> new Ajax.Updater(''respuesta'',
''/search/similar_items'',
> {asynchronous:true, evalScripts:false, insertion:Insertion.Bottom(m,
> null)});
>
> Insertion.Bottom has 2 parameters: element and html code. m is a
> javascript variable that contains a reference to element, but html
> code will be returned at Ajax.updater,
>
> Could anybody help me?
>
> Thanks in advance
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
Thanks! It was really useful On Oct 16, 7:26 pm, Walter Lee Davis <wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote:> When you pass the insertion to Updater, you just have to pass which > insertion to use, the variables are inferred from the output of the > updater. > > //untested!! > > new Ajax.Updater(''m'', ''/search/similar_items'', > {asynchronous:true, evalScripts:false, insertion:Insertion.After}); > > Walter > > On Oct 16, 2007, at 7:07 AM, symfo wrote: > > > > > Hi everybody, > > > I have a list of words (<ul><li>...). When I click on one of them, a > > new sub list show at the bottom of clicked element. > > So I''d like to call ajax.updater correctly to show sublist under > > clicked element (var m in javascript code). > > > This is my incorrect code: > > > new Ajax.Updater(''respuesta'', ''/search/similar_items'', > > {asynchronous:true, evalScripts:false, insertion:Insertion.Bottom(m, > > null)}); > > > Insertion.Bottom has 2 parameters: element and html code. m is a > > javascript variable that contains a reference to element, but html > > code will be returned at Ajax.updater, > > > Could anybody help me? > > > Thanks in advance--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---