If it is working statically, then the calculations for the height must not being coming back with a valid value / type...
Are you positive you calculation is coming back with an actual value rather than NaN etc. It has to be a INT (whole number). (@products.length/4 ).ceil - what language is this evaluated by? If it is JS, then is needs to be Math.ceil(@products.length/4 ) You might also want to ensure your number is converted to a string properly by using String(val) or val.toString() or (hackishly) val+='' you can alert the value before passing it for sanity (or use Firebug to look at the value) Cheers, Aran On Wed, Mar 10, 2010 at 6:11 PM, SH <[email protected]> wrote: > Hi, > Thank u for the quick responses. > > > Once you set it, you will not be able to change it and have it update. I > > just wanted get a sanity check on that part. > No I am not changing the value once it is set. But while setting the > height I have to calculate it based on a few things so i cant set it > statically. > > > To set a baseline working example - If you just statically set the height > as > > a test are you seeing the result you expect? > Yes, it is working if I give a static height. > var so = new SWFObject("/amcharts/amline.swf", "Sales", "1010", "280", > "8", "#FFFFFF"); > works perfectly. > > Any help? > > Aran > > > > On Wed, Mar 10, 2010 at 2:56 PM, SH <[email protected]> wrote: > > > it is not working for me even I convert ht to string. Any Idea what is > > > wrong? > > > > > On Mar 9, 11:27 am, Sam Sherlock <[email protected]> wrote: > > > > that should be ok ht should be a string > > > > > > - S > > > > > > On 9 March 2010 04:00, SH <[email protected]> wrote: > > > > > > > Hi all, > > > > > > > For my SWF object I have to calculate its height based on some > > > > > parameters. > > > > > How achieve I something like this? > > > > > > > var ht = 280+((@products.length/4 ).ceil)*15 > > > > > var so = new SWFObject("/amcharts/amline.swf", "Sales", "1010", ht, > > > > > "8", "#FFFFFF"); > > > > > > > Cheers, > > > > > SH > > > > > > > -- > > > > > You received this message because you are subscribed to the Google > > > Groups > > > > > "SWFObject" group. > > > > > To post to this group, send email to [email protected]. > > > > > To unsubscribe from this group, send email to > > > > > [email protected]<swfobject%[email protected]> > <swfobject%[email protected]<swfobject%[email protected]> > > > > > <swfobject%[email protected]<swfobject%[email protected]> > <swfobject%[email protected]<swfobject%[email protected]> > > > > > > > > > . > > > > > For more options, visit this group at > > > > >http://groups.google.com/group/swfobject?hl=en. > > > > > -- > > > You received this message because you are subscribed to the Google > Groups > > > "SWFObject" group. > > > To post to this group, send email to [email protected]. > > > To unsubscribe from this group, send email to > > > [email protected]<swfobject%[email protected]> > <swfobject%[email protected]<swfobject%[email protected]> > > > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/swfobject?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "SWFObject" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<swfobject%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/swfobject?hl=en. > > -- You received this message because you are subscribed to the Google Groups "SWFObject" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/swfobject?hl=en.
