The idea is that when the user selects a client only the client’s
projects are displayed as options in the second select box. However I am
coming across a JavaScript error. Not knowing much about JavaScript (Not
enough to dbug prototype.js anyway!) I am rather stuck. FireBug gives me
the following javascript trace:
element has no properties
prototype.js?1159… (line 1506)
anonymousprototype.js?1159… (line 1506)
anonymousprototype.js?1159… (line 1658)
anonymousprototype.js?1159… (line 1615)
anonymousprototype.js?1159… (line 20)
nullhttp://localhost:… (line 14)
As far as I can see I haven’t done anything totally out of whack on the
RoR side. I am running on Edge Rails so am not sure if it is me or an
issue in Edge (Or prototype.js).
Can you post the resulting action and RJS code? It looks like you’re
referencing a DOM element that doesn’t exist (misspelled?).
Jason
Hi Jason.
this is the first time I have used field observers and RJS so I haven’t
written the resulting action yet. The first step was to get the observer
working and contacting the server.
Currently it isn’t calling the server when the field changes.
I assume that I don’t have to worry about the resulting action until I
can verify that the server action is being called.
Hmm, it looks ok, though the :with syntax may be a problem. For the
record,
you don’t need :with if it’s dealing with just a field, Rails knows what
you’re trying to do.
Can you post the resulting HTML? That will help solve this.
Jason
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.