Rails Surfer wrote:
> I need to send geo coördinates from a mysql database to a google maps
> javascript.
> 
> There´s no problem to get them into rails...But how can i send them to
> javascript ?
> 
> I know javascript is client side so i think it´s impossible to include
> ruby variables...
> 
> Suggestions ?

What I always do is this: have Rails put the data in a hidden HTML 
element with a known ID. Then the JavaScript can read the contents of 
that element.

> 
> Thanks

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
-- 
Posted via http://www.ruby-forum.com/.

-- 
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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to