Using Firebug with 'persist' switched on (which hangs onto errors past
page reloads), I get the message 'update of dom-id which is not a
part: searchresults'. Did you try adding 'part="searchresults"' to
that div?
--Matt Jones
On May 8, 2010, at 4:10 PM, blueHandTalking wrote:
I have used the same exact methods when doing ajax forms
in conjunction with other models. I am just very perplexed as to
why using an ajax form with user model does not work. Could
it be something with the permission system?
The results I get are the contents of my object just being dumped
to the page.
Also, the URL is changed to include the action, i.e. users/search.
This does not happen with other form using ajax. The URL is not
changed.
Jet
On May 8, 8:45 am, blueHandTalking <[email protected]> wrote:
...and the URL of the result page is:
http://padhouses.com/users/clientsearch?search=craftsman
I don't quite undersand this.
Jet
On May 8, 8:27 am, blueHandTalking <[email protected]> wrote:
Why does my application log show:
Processing UsersController#show (for 66.165.26.192 at 2010-05-08
15:11:31) [GET]
Parameters: {"search"=>"craftsman", "action"=>"show",
"id"=>"clientsearch", "controller"=>"users"}
...when my form below has the following in the page:
<form onsubmit="Hobo.ajaxRequest(this, ['searchresults']); return
false;" method="get" action="/users/clientsearch">
This is the action called:
def clientsearch
@myclients = User.search params[:search] # , :conditions =>
{:category => :client}
respond_to do |wants|
wants.html
wants.js
end
end
...and in routes.rb
map.connect 'users/clientsearch', :controller => 'users', :action
=>
'clientsearch'
...Jet
On May 5, 1:55 pm, blueHandTalking <[email protected]> wrote:
I am having a problem in my users_controller.
hobo_user_controller
auto_actions :all
I have defined an 'update' method. It works perfect,
and has this respond_to in it:
respond_to do |wants|
wants.html { }
wants.js
I defined a search method:
index_action :search
def search
@myclients = User.search params[:search], :conditions =>
{:category => :client}
respond_to do |wants|
wants.html
wants.js
end
end
The above does not work. I have used identical formats in
the rjs file and partial of the search method as I did in the
update
method.
The output from my search to my page is:
$("searchresults").replacehtml({"partial": "search", "object":
[null]});
This is just dumped to the page, and not output in the
searchresults
div as it should be.
(the null part is not an error, as my object is null at this
point).
For some reason it does not seem like I am flowing through the
rjs file and the partial.
I did notice one difference in the URL's:
In the search method my URL (URI??) is
http://padhouses.com/users/search?search=modern
While when using the update method it is
http://padhouses.com
In the update I am doing a post, while in the search I am doing
a get. Still, it seems that it is an AJAX request, that they would
both be the same.
Here is the form I am using, no implicit context AFAIK:
<form action="/users/search" method="get"
update="searchresults">
<input id="search" type="text" name="search" />
<submit id="searchsubmit" label="SEARCH" />
</form>
If there is more hobo-esque way of doing above, please let me know.
Anyway, if anyone would have an idea of why this is broken,
I would be as pleased as punch to hear it.
Cheers,
Jet
--
You received this message because you are subscribed to the
Google Groups "Hobo Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected]
.
For more options, visit this group athttp://groups.google.com/group/hobousers?hl=en
.
--
You received this message because you are subscribed to the Google
Groups "Hobo Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected]
.
For more options, visit this group athttp://groups.google.com/group/hobousers?hl=en
.
--
You received this message because you are subscribed to the Google
Groups "Hobo Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected]
.
For more options, visit this group athttp://groups.google.com/group/hobousers?hl=en
.
--
You received this message because you are subscribed to the Google
Groups "Hobo Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected]
.
For more options, visit this group at http://groups.google.com/group/hobousers?hl=en
.
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en.