I''ve been having some problems in Firefox with observe_field. Everything seems to work fine in IE, however when I try to observe a select box nothing seems to happen in firefox. I downloaded FireBug to investigate, and an error in prototype.js is raised 2751 getValue: function(element) { 2752 element = $(element); 2753 var method = element.tagName.toLowerCase(); 2754 return Form.Element.Serializers[method](element); 2755 }, Below is the error displayed in FireBug: element has no properties getValue(null)prototype.js (line 2753) getValue()prototype.js (line 2875) initialize("paragraph[letter_type_id]", 0.25, function())prototype.js (line 2853) create()prototype.js (line 37) var method = element.tagName.toLowerCase(); I''ve read that this may have to do with how DOM is handled in IE vs Firefox. Anyone have any suggestions? -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
It is saying that element is a null variable meaning that the string element in line 2752 "$(element)" is not a valid id. please post the rhtml template including the observe_field code and the html element being observed -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Keynan Pratt wrote:> It is saying that element is a null variable meaning that the string > element in line 2752 "$(element)" is not a valid id. > please post the rhtml template including the observe_field code and the > html element being observedYour right. Thanks Keynan, I realized that I had only given the select field a ''name'' and not an ''id''. I guess IE works with just a name, but firefox must use the id to retrieve the element. Thanks for your help. -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---