Hobo Ajax Form
Reported by Charléric | January 30th, 2012 @ 08:42 AM
I used Hobo ajax form with update attribute and the problem is
that the field who's id in update attribute isn't updated :
rails -v => 3.0.9
ruby -v => ruby 1.9.2p180 (2011-02-18) [i386-mingw32]
hobo gems
* hobo (1.3.0.RC) * hobo_fields (1.3.0.RC) * hobo_support
(1.3.0.RC) Tell me if you need others gem version.
description :
the form :
<div part="testzone">
text to replace
</div>
<form action="#{url_for(:action => 'update_exe')}" success="alert('success')" update="testzone">
<button id="updatebutton">Update</button>
</form>
the html generated :
<div id="testzone">
text to replace
</div>
<form action="/passerelles/10-aptalis/update_exe" method="post" onsubmit="Hobo.ajaxRequest(this, ['testzone'], {onSuccess:function(request){alert('success')}}); return false;"><div class="hidden-fields"><input id="page_path" name="page_path" type="hidden" value="/passerelles/10-aptalis"><input name="authenticity_token" type="hidden" value="70YyqgiXJxhY82JiPlPVBC1p2KhIa8wuZ9jPNXp2ArA="></div>
<button id="updatebutton">Update</button>
</form>
the controller's method :
web_method update_exe
def update_exe
render :text => "new text"
end
##the console's logs :##
Started POST "/passerelles/10-aptalis/update_exe" for 127.0.0.1 at 2012-01-30 09
:31:20 +0100
[.......]
Processing by PasserellesController#update_exe as JS
Parameters: {"authenticity_token"=>"70YyqgiXJxhY82JiPlPVBC1p2KhIa8wuZ9jPNXp2Ar
A=", "render"=>{"0"=>{"part_context"=>"BAhbCDoQdGVzdHpvbmViaXNJIhJwYXNzZXJlbGxlO
jEwBjoGRUZbAA==--94267fb5b9bb36de489340d7528c15ebb4946c28\n", "id"=>"testzonebis
"}}, "page_path"=>"/passerelles/10-aptalis", "_"=>"", "id"=>"10-aptalis"}
←[1m←[36mUser Load (2.0ms)←[0m ←[1mSELECT "users".* FROM "users" WHERE "users
"."id" = 1 LIMIT 1←[0m
Rendered text template (0.0ms)
Completed 200 OK in 80ms (Views: 3.0ms | ActiveRecord: 18.0ms)
When I click on the update button, the request is done and
nothing is replaced.
Request is cool, I have and alert that tell me the ajax request is
a success.
I see in the log's that my controller send me back some text.
But the fields arn't replaced by anything.
I don't see any subject speak about this.
This is a bug or am I really bad ?!!
Comments and changes to this ticket
-
Bryan Larsen January 30th, 2012 @ 03:10 PM
- State changed from new to invalid
Probably not a bug. Post your question to the mailing list and I'll answer there, since others may find the answer useful.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »