On Mar 23, 12:52 pm, Intern ruby <rails-mailing-l...@andreas-s.net>
wrote:
> This is my code and I am trying to call remote function when somebody
> click on add button after selecting something from select_tag. Please
> tell me where I am wrong ? I am getting following error: Ajax not
> defined.

Probably means that your page doesn't load the prototype javascript
library (which is the thing that adds the Ajax object). See
javascript_include_tag

Fred
>
> <input type="button" value="< Add" class="button" onclick="<%=
> remote_function(:url => {:controller => 'users', :action => 'add_line'})
> %>" />
>
> <%= select_tag 'available_line_id[]',options_for_select(customers),{:id
> => 'available_line_id',:multiple => true, :size => 13, :style => 'width:
> 225px;'} %>
>
> Thanks,
>
> Attachments:http://www.ruby-forum.com/attachment/3475/new.html.erb
>
> --
> Posted viahttp://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