Is the observe_field (ActionView::Helpers::PrototypeHelper )
can be apply to any html tag? (such as div)
I tried to apply ''observe_field'' to observe the content of
<div> tag, but, as the observed <div>''s content was
changed,
there was nothing happend.
for example (in test.rhtml):
<%= link_to_remote "test", :update=>"content1",
:url=> { :action=>
"echo"} %>
<div id="content1"> content1 </div>
<div id="content2" > content2 </div>
<%= observe_field "content1", :update=>"content2" ,
:url=> {
:action=>"echo2"} %>
** "echo1" and "echo2" do only rendering the text.
what i expect is that after i click ''test'',
''content1'' wil be changed,
and after that , ''content2'' will be changed too, but what
happends in
real
is only a change on ''content1''.
did i do something wrong? anyone has comments?
--
Posted via http://www.ruby-forum.com/.