Displaying 3 results from an estimated 3 matches for "sub_focuses".
Did you mean:
sub_focus
2006 Mar 02
0
Help with this comparison and loop
...e_sub_focus_id'',
''/kate/tick/admin/add_sub_focus'', {asynchronous:true, evalScripts:true,
parameters:''focus_id=''+ value + ''&sf_id=2''})})
//]]>
</script>
All is good. Now in my controller I have:
def add_sub_focus
@sub_focuses = SubFocus.find_all_by_focus_id(@params["focus_id"])
@sf_id = @params["sf_id"]
end
My add_sub_focus.rhtml file:
<% for sub_focus in @sub_focuses do -%>
<% if #{sub_focus.id} != #{sf_id} %>
<option value="<%= sub_focus.id %>...
2006 Feb 13
0
(no subject)
Here is my db setup:
focus
id
name
sub_focus
id
focus_id
name
I have a select menu for focus and want to fill another select menu for
sub_focus (with AJAX) depending on what the focus is can someone point
me in the right direction?
Thanks.
Seth Buntin
-------------- next part --------------
An HTML attachment was
2006 Feb 13
0
(no subject)
If you''ve not bought the Agile Web Development book or the new Rails
Recipes book, you really should. A lot of the questions you''re asking
are in there along with a lot of really important concepts.
You need to look into observe_field which monitors a form field for
changes and then updates an element (usually a div with an id) with the
results from an AJAX call.
Then you