I am trying to use the setStyle function to dynamically change the
height of an element. Depending on the content of the page, the height
of the element needs to change so I am trying to pass a variable in to
setStyle like so:
$(backgroundContainer).setStyle({ height: myVariable });
I keep getting "Error in parsing value for property
''height''.
Declaration dropped"
Can anyone offer me some guidance? Thanks!!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
What does alert(typeof myVariable + '' '' + myVariable); say? On 20 nov, 20:14, polomasta <bjo...-PGNGAmqIy5icqzYg7KEe8g@public.gmane.org> wrote:> I am trying to use the setStyle function to dynamically change the > height of an element. Depending on the content of the page, the height > of the element needs to change so I am trying to pass a variable in to > setStyle like so: > > $(backgroundContainer).setStyle({ height: myVariable }); > > I keep getting "Error in parsing value for property ''height''. > Declaration dropped" > > Can anyone offer me some guidance? Thanks!!--~--~---------~--~----~------------~-------~--~----~ 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 get "number 887" which seems correct. So i need to take that number and use setStyle to set the height of a div. On Nov 20, 2:13 pm, Roland <franssen.rol...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> What does alert(typeof myVariable + '' '' + myVariable); say? > > On 20 nov, 20:14,polomasta<bjo...-PGNGAmqIy5icqzYg7KEe8g@public.gmane.org> wrote: > > > I am trying to use the setStyle function to dynamically change the > > height of an element. Depending on the content of the page, the height > > of the element needs to change so I am trying to pass a variable in to > > setStyle like so: > > > $(backgroundContainer).setStyle({ height: myVariable }); > > > I keep getting "Error in parsing value for property ''height''. > > Declaration dropped" > > > Can anyone offer me some guidance? Thanks!!--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
setStyle({height:myVariable + ''px''})
that should do it...
On 26 nov, 14:13, polomasta
<bjo...-PGNGAmqIy5icqzYg7KEe8g@public.gmane.org>
wrote:> I get "number 887" which seems correct. So i need to take that
number
> and use setStyle to set the height of a div.
>
> On Nov 20, 2:13 pm, Roland
<franssen.rol...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> > What does alert(typeof myVariable + '' '' +
myVariable); say?
>
> > On 20 nov,
20:14,polomasta<bjo...-PGNGAmqIy5icqzYg7KEe8g@public.gmane.org> wrote:
>
> > > I am trying to use the setStyle function to dynamically change
the
> > > height of an element. Depending on the content of the page, the
height
> > > of the element needs to change so I am trying to pass a variable
in to
> > > setStyle like so:
>
> > > $(backgroundContainer).setStyle({ height: myVariable });
>
> > > I keep getting "Error in parsing value for property
''height''.
> > > Declaration dropped"
>
> > > Can anyone offer me some guidance? Thanks!!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
You always need to specify the unit of something you set... be it ''px'', ''%'' or even ''pt''... On 26 nov, 14:28, Roland <franssen.rol...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> setStyle({height:myVariable + ''px''}) > > that should do it... > > On 26 nov, 14:13, polomasta <bjo...-PGNGAmqIy5icqzYg7KEe8g@public.gmane.org> wrote: > > > I get "number 887" which seems correct. So i need to take that number > > and use setStyle to set the height of a div. > > > On Nov 20, 2:13 pm, Roland <franssen.rol...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > What does alert(typeof myVariable + '' '' + myVariable); say? > > > > On 20 nov, 20:14,polomasta<bjo...-PGNGAmqIy5icqzYg7KEe8g@public.gmane.org> wrote: > > > > > I am trying to use the setStyle function to dynamically change the > > > > height of an element. Depending on the content of the page, the height > > > > of the element needs to change so I am trying to pass a variable in to > > > > setStyle like so: > > > > > $(backgroundContainer).setStyle({ height: myVariable }); > > > > > I keep getting "Error in parsing value for property ''height''. > > > > Declaration dropped" > > > > > Can anyone offer me some guidance? Thanks!!--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
ahh of course... so simple On Nov 26, 10:06 am, Wizz <woutaw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> You always need to specify the unit of something you set... be it > ''px'', ''%'' or even ''pt''... > > On 26 nov, 14:28, Roland <franssen.rol...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > setStyle({height:myVariable + ''px''}) > > > that should do it... > > > On 26 nov, 14:13, polomasta <bjo...-PGNGAmqIy5icqzYg7KEe8g@public.gmane.org> wrote: > > > > I get "number 887" which seems correct. So i need to take that number > > > and use setStyle to set the height of a div. > > > > On Nov 20, 2:13 pm, Roland <franssen.rol...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > What does alert(typeof myVariable + '' '' + myVariable); say? > > > > > On 20 nov, 20:14,polomasta<bjo...-PGNGAmqIy5icqzYg7KEe8g@public.gmane.org> wrote: > > > > > > I am trying to use the setStyle function to dynamically change the > > > > > height of an element. Depending on the content of the page, the height > > > > > of the element needs to change so I am trying to pass a variable in to > > > > > setStyle like so: > > > > > > $(backgroundContainer).setStyle({ height: myVariable }); > > > > > > I keep getting "Error in parsing value for property ''height''. > > > > > Declaration dropped" > > > > > > Can anyone offer me some guidance? Thanks!!--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
prototype IS simple =] On 26 nov, 18:24, polomasta <bjo...-PGNGAmqIy5icqzYg7KEe8g@public.gmane.org> wrote:> ahh of course... so simple > > On Nov 26, 10:06 am, Wizz <woutaw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > You always need to specify the unit of something you set... be it > > ''px'', ''%'' or even ''pt''... > > > On 26 nov, 14:28, Roland <franssen.rol...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > setStyle({height:myVariable + ''px''}) > > > > that should do it... > > > > On 26 nov, 14:13, polomasta <bjo...-PGNGAmqIy5icqzYg7KEe8g@public.gmane.org> wrote: > > > > > I get "number 887" which seems correct. So i need to take that number > > > > and use setStyle to set the height of a div. > > > > > On Nov 20, 2:13 pm, Roland <franssen.rol...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > What does alert(typeof myVariable + '' '' + myVariable); say? > > > > > > On 20 nov, 20:14,polomasta<bjo...-PGNGAmqIy5icqzYg7KEe8g@public.gmane.org> wrote: > > > > > > > I am trying to use the setStyle function to dynamically change the > > > > > > height of an element. Depending on the content of the page, the height > > > > > > of the element needs to change so I am trying to pass a variable in to > > > > > > setStyle like so: > > > > > > > $(backgroundContainer).setStyle({ height: myVariable }); > > > > > > > I keep getting "Error in parsing value for property ''height''. > > > > > > Declaration dropped" > > > > > > > Can anyone offer me some guidance? Thanks!!--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---