I have a problem with aulo script. If i create a javascript and i find a width of div "pippo" now i want resize div pippo with aculo script morph with params style: width= (width of pippo)+ 155 how i can give a params to aculo script??? Thank Gianluca --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I insert my script corpoWidth=document.getElementById(''corpo_centrale'').offsetWidth; newCorpoWidth=corpoWidth+155; string="{style: ''width:"+newCorpoWidth+";}''"; alert(string); new Effect.Move (elem,{ x: 155, y: 0, mode: ''relative''}); new Effect.Morph (''corpo_centrale'',{style: ''width:''+newCorpoWidth'';}''); On 17 Lug, 13:23, "glade...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <glade...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have a problem with aulo script. > > If i create a javascript and i find a width of div "pippo" > > now i want resize div pippo with aculo script morph with params style: > width= (width of pippo)+ 155 > > how i can give a params to aculo script??? > > Thank > > Gianluca--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
To set the new width, try this: w = parseInt($(''pippo'').style.width.replace(''px'','''')) + 55 $(''pippo'').style.width = w + ''px'' On Jul 17, 7:26 am, "glade...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <glade...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I insert my script > > corpoWidth=document.getElementById(''corpo_centrale'').offsetWidth; > newCorpoWidth=corpoWidth+155; > string="{style: ''width:"+newCorpoWidth+";}''"; > alert(string); > new Effect.Move (elem,{ x: 155, y: 0, mode: ''relative''}); > new Effect.Morph (''corpo_centrale'',{style: > ''width:''+newCorpoWidth'';}''); > > On 17 Lug, 13:23, "glade...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <glade...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I have a problem with aulo script. > > > If i create a javascript and i find a width of div "pippo" > > > now i want resize div pippo with aculo script morph with params style: > > width= (width of pippo)+ 155 > > > how i can give a params to aculo script??? > > > Thank > > > Gianluca--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---