hi all! i don''t know that javascript into the ruby variable

Eric Mill
Fri, 22 May 2009 15:05:49 -0000

That actually is not going to be possible, the way you''re doing it.
ERB can''t evaluate the JavaScript like that.

What you might want to do is to write the @people hash out onto the
page somewhere else first, as a JavaScript hash, and then have your
function look up [name] in the JS hash.

-- Eric

On Fri, May 22, 2009 at 10:02 AM, in-seok hwang <his2000x at gmail.com>
wrote:
> hi all!
>
> sorry! i''m not speak english well.
> but, i want to learning.
>
> this is my code.
>
>> 553         text <<-JAVASCRIPT
>> 554
>> .....clipping.....
>> 571             function grow_window(name)
>> 572             {
>> 573                 $(''name'').innerHTML = "?? :
>> #{@people[name].fetch(''name'')}"
>> 574                 Effect.Grow(''profile_grow'');
>> 575             }
>> 576
>> 577         JAVASCRIPT
>
> I would like to put in javascript''s variable(name) to red point.
>
> but , i can''t remember Programming syntax.
>
> plz give me hint.
>
> thank you for reading my artcle.
>
> have a nice day.
>
>
>
> _______________________________________________
> Camping-list mailing list
> Camping-list at rubyforge.org
> http://rubyforge.org/mailman/listinfo/camping-list
>