Using the following simple form with a select box, the observe_field is
throwing a javascript error related to the "getValue()" method in the
prototype library.  Any ideas as to why?  Everything that I can tell is
well formed syntactically.  I'm running Rails 2.1.0.

<% form_tag :action => :new do %>
  <%= select_tag 'transaction_type', "<option></option><option>Tuition
Reimbursement</option><option>Schools & Seminars</option>" %><br /><br
/>

  <%= observe_field('transaction_type',
           :url => { :action => "display_alternate_fields" },
           :update => "transaction_specific",
           :with => "'transaction_type=' + encodeURIComponent(value)")
%>

  <div id="transaction_specific">&nbsp;</div>
  <div><%= submit_tag "Create" %></div>
<% end %>


The error points to the following line (-->) within the serialize
portion of "Form.Element.Methods" in "prototype.js":

  getValue: function(element) {
    element = $(element);
    var method = element.tagName.toLowerCase();
--> return Form.Element.Serializers[method](element);
  },
-- 
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to