On May 31, 2011, at 6:58 PM, Jedrin wrote:
I tried this which doesn't seem to do anything either: page[k].set_style :z_index => 20 I believe that the following syntax is valid: page[k].set_style :'z-index' => 20 I tried this: C:\Users\Laurence>irb irb(main):001:0> irb(main):002:0* irb(main):003:0* x = :'z-index' => :"z-index" irb(main):004:0> x.class => Symbol irb(main):005:0> irb(main):009:0> x => :"z-index" irb(main):010:0>
I agree, that does seem to work as expected. I'm not an expert on the RJS side of things, but I have used Prototype for many years, and $ ('foo').setStyle('z-index: 20') certainly works there. Maybe there's an alternative syntax you could use, where instead of pecking away with multiple calls to set_style, you could concatenate a hash and send the whole thing at once, maybe something like foo.set_style {:'z- index' => 20, :font_size => font_sz, ... }
Walter -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" 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/rubyonrails-talk?hl=en.

