通常用 Java字处理。 我没有特别享受ding本,因此我申请的是使用一种表格“观察器”(一种铁路助手,利用Prototype Javascript的图书馆来观察您的表格,以便进行投入变化),并根据美国宇宙航空研究开发机构呼吁的结果,更新了含有第二盒子的超文本中的数字四。 自美国宇宙航空研究开发机构与我的服务器会谈以来,我可以书写鲁比的任意复杂逻辑,使新的超文本化。
例:
#goes in view
<%= Code to render the first list box. %>
<%= render :partial => second_list_box_partial , :locals => {:selected = insert_magic_here } %>
<%= observe_field(:first_list_box,
:url => { :action => :second_box_ajax }),
:frequency => 0.5,
:update => :second_list_box_div,
:with => %Q| value= + $( first_list_box ).value; |
%>
#goes in controller
def second_box_ajax
first_box_value = params[:value]
#magic goes here
@selected = #more magic
render :partial => second_list_box_partial , :locals => {:selected => @selected}, :layout => false
end
#goes in partial
<div id="second_list_box_div">
Actual code to render list box goes here.
</div>