Dear all
I am writing a program that use observe_field to listen 1 field. The code is as follow:
<form name="sform" action="" style="display:inline;"> <label for="item_name">Filter on Application Code : </label> <%= text_field_tag('appcode', params['appcode'], :size => 10 ) %> </form>
<%= observe_field 'app_code', :frequency => 2, :update => 'table', :url => {:action => :index}, :with => 'appcode' %>
I would like to enhance this to listen more than 1 fields, I try below code
<form name="sform" action="" style="display:inline;"> <label for="item_name">Filter on Hospital Code : </label> <%= text_field_tag('hospcode', params['hospcode'], :size => 10 ) %> <br> <label for="item_name">Filter on Application Code : </label> <%= text_field_tag('appcode', params['appcode'], :size => 10 ) %> </form>
<%= observe_field 'appcode', :frequency => 2, :update => 'table', :url => {:action => :index}, :with => 'appcode' %>
<%= observe_field 'hospcode', :frequency => 2, :update => 'table', :url => {:action => :index}, :with => 'hospcode' %>
It seems not a clever approach, could you give me some hint on that?
Thank you very much.
Valentino