Hi,
I know this has been asked a million times before - but I still don’t
really get it. CAn someone please tell me what’s up with the following;
In a view I have (apologies for the formatting);
<td>
<select id="job.job_phase_id" name="job[job_phase_id]"><p><label
for=“job_job_phase_id”>Job Phase
<%= options_from_collection_for_select @jp, “id”, “description”,
job.job_phase_id %>
<%= observe_field(?job.job_phase_id?,
:frequency => 0.25,
:update => ?action_container?,
:url => { :controller => ‘job’, :action =>
:get_action_from_phase },
:with => ??job_phase_id=?+value?) %>
<td id='action_container'>
<select id="job.current_action_id"
name=“job[current_action_id]”>
Job
Phase
<%= options_from_collection_for_select @ja, “id”, “description”,
job.current_action_id %>
In the controller this;
def get_action_from_phase
breakpoint
@ja = ActionType.find(:all, :conditions => [‘job_phase_id = ?’,
params[job_phase_id]])
end
The prototype.js is called at the head of the shell page ;
!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”
“http://www.w3.org/TR/html4/loose.dtd”>
Kind Regards,
Eric