Hi all,
Forgive what I expect is a silly question.
I have the following code:
#CONTROLLER
def calculate
render :partial => ''calculate''
end
#CALCULATE PARTIAL
<%= update_element_function("update_1", :position => :bottom,
:content
=> "<p>New product1!</p>") %>
#VIEW
<p><label for="order_unit_price">Unit
price</label><br/>
<%= text_field ''order'', ''unit_price''
%></p>
<%= observe_field(''order_unit_price'', :frequency => 0,
:complete =>
''eval(request.reponseText)'', :url => { :action =>
:calculate})%>
...
<div id="update_1" style="margin:10px; padding:10px; border:
dotted 1px
red">
As you can see entering a value in the order_unit_price field fires of
an Ajax.request to the calculate method of the controller, which returns
the Javascript from the partial.
I''ve been struggling with this for a while testing in Firefox 1.0.6 on
Windows XP, and using the Tamperdata extension and Ethereal to check the
Ajax request/response. The response is definitely being returned, but
nothing appears in the page.
I must be missing something really obvious, but I just can''t see it.
Thanks for any light you can shed!
James