Shahin Kordasti wrote:
> Hi,
> 
> I am trying to do a rails application that uses google map to allow
> users to specify longitude and latitude and then the google map should
> be updated to show that location which was specified.
> 
> I am using observe_field on the text field like this:
> 
>         <%= observe_field 'geo_loc_cords',
>         :url => {:action => :update_map, :form_authenticity_token =>
> form_authenticity_token},
>         :update => :map,
>         :with => '"cords="+element.value',
>         :loading => "Element.show('spinner')",
>         :complete => "Element.hide('spinner')" %>
> 
> and my map div looks like this:
> 
> <%= @map.div(:width => 400, :height => 300) %>
> 
.
.
.
> 
> What am I doing wrong to make the resulting javascript outputted on the
> page rather than interpreted as javascript?

Solved it, just needed to remove the :update => :map in observe field.
:)
-- 
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-talk@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