Hey all,
I''m trying to update a div everytime the value of my textbox is
changed:
here is _form.rhtml:
<p><label
for="bookmark_address">Address</label><br/>
<%= text_field ''bookmark'', ''address'' ,
:size => 120 %></p>
<div id="ajaxtitle">
<%= render :partial => ''bookmarktitle'' %>
</div>
<%= observe_field ''bookmark_address'',:frequency =>
0.5,
:update => ''ajaxtitle'',
:url => {:action => ''bookmarkaddress'' },
:with => "''url='' +
bookmark_address.value" %>
and this is the updated part _bookmarktitle.rhtml:
<p><label
for="bookmark_title">Title</label><br/>
<%= text_field ''bookmark'', ''title'' ,
:value=>@title, :size => 120 %></p>
the function bookmarktitle:
def bookmarkaddress
@title = "test value"
end
However when I modify champ bookmark_address, nothing happens.
Any idea what''s wrong in my code?
Thanx in advance
Pat