Displaying 20 results from an estimated 50000 matches similar to: "multiple xhr requests"
2006 Jul 26
4
How to Firebug XHR/AJAX requests
Saw a lot of recommendations for Firebug
(http://www.joehewitt.com/software/firebug/) on this list. I''ve scanned
its docs and tried it--many useful features. But I''m so dense that I
can''t get it to spy XHR/AJAX requests and their response on FC5 running
Firefox 1.5.0.4 and Firebug 0.4.
Can someone tell me how to get to
2006 Jun 24
5
request.xhr? vs. respond_to
Searched around this forum, but didn''t find an answer for this question.
Can you help this newbie understand any overlap and/or difference
between request.xhr? and respond_to?
If request.xhr? is true, should I expect it wants.js below?
respond_to do |wants|
wants.html { redirect_to(person_list_url) }
wants.js
wants.xml { render :xml => @person.to_xml(:include
2006 Jul 12
3
request.xhr? is false after redirecting an AJAX request?
Dear everybody
I''m trying to develop a web application that makes use of AJAX, but also works
if a user has no (or doesn''t want to use) JS. For normal requests, this is
pretty easy. Almost every action ends with
render blahblah, :layout => !request.xhr?
This way, I can use the same action to render a full page (with layout) as
well as rendering an AJAX request (only the
2007 Apr 26
2
assert_select with respond_to JS or xhr?
Hi everyone,
I am a bit confused with xhr? and respond_to.
I have the folloing code in my view to update the ''emails'' ID
link_to_remote(image_tag("refresh"), :update => "emails",
:url => { :action => "list_emails" })
in the controller side i have somthing like :
[..]
respond_to do |type|
type.html { render :action
2008 Mar 31
1
How to make a ajax (xhr) redirect?
Hi all,
In my application, I want seamless degradability so I use request.xhr?
to check whether a request is an ajax call. However here and there, I
need to use redirect_to - in this case the request is not xhr anymore,
and the check doesn''t work as expected. Is there a way to make xhr-
like redirect (which allow to get to another controller+action)?
Thanks,
- Chuong
2007 Dec 03
8
automatic 'verify :xhr => true' for methods ending with _xhr
hey guys,
i am writing a couple of actions which are only used with an xhr. I
''protect'' them all against a direct access with the ''verify'' method in
the controller
verify :only => ..., :xhr => true
it would be cool if the system would automatically recognize the xhr
actions and protect them ... i want to postfix methods with ''_xhr'' and
2008 Jun 05
2
xhr :post giving wrong number of arguments on rails 2.1?
Getting a strange error.
In a story I have the following step:
When "I submit a search name" do
xhr :post, ''/searches'', {:search => {:given_name => "bob", :family_name =>
"smith"}}
end
I am getting:
ArgumentError: wrong number of arguments (4 for 3)
stories/searching_story_spec.rb:45 in "I submit a search name"
But I only
2006 May 31
0
Help with xhr request in integration tests
Hello,
The documentation at api.rubyonrails.com for
ActionController::TestProcess#xhr or xml_http_reponse gives method as
the first parameter and action as the second parameter folled by the
parameters hash, etc. But ActionController::Integration::Session#xhr
has a path, followed by the parametes hash, and apparently no alias
for xhr. Of course, the documentation in the AWDwR book would tend to
2006 Mar 22
3
Parent-Child Tables Help
can someone help me with this
i have a table
cars
(
id int
model_id int
make_id int
color_id int
description text
constraint fk_cars_carmake foreign key(make_id) references
carmakes(id),
constraint fk_cars_carmodel foreign key(model_id) references
carmodels(id),
constraint fk_cars_color foreign key(color_id) references colors(id)
)
carmakes
(
id int
carmake varchar
)
carmodels
(
id
2010 Oct 18
0
Ajax call-request.xhr? = false Rails 3
I have the following tag in a view:-
<%= form_tag url_for({:controller => params[:area], :action
=> :search, :area => params[:area] }), :method => :get, :remote =>
true do %>
<%= label_tag(:query, "Search for:") %>
<%= text_field_tag("query", params[:query], :autocomplete =>
"off", :onKeyPress=>"return
2005 Dec 15
2
link_to_remote and browser compatibility
link_to_remote generates the javascript: new Ajax.Updater(...). Have I
missed something or doesn''t this handle browsers with javascript support
but without XHR support?
What I''d like to do is:
1. If the browser supports XHR, use XHR
2. If the browser supports javascript (and perhaps even if the XHR
request fails) do a POST via javascript
3. If the browser doesn''t
2009 May 28
1
scripted virt-install fails
I have successfully installed several CentOS 5 VMs on a CentOS 5 Xen
DOM0 using a local repo and kickstart files with Virt Manager.
Using the same machine and setup, I have tried a scripted install
using same repos and kickstart file with virt-install. The only
difference I can see is that with virt-install I'm disabling the
display (no VNC).
The install goes well but the new VM
2006 Jul 24
0
Redirect/rendering out of xhr
Hi,
I have a link_to_remote to an action in my controller, which has an rjs file
associated with it. In the action (where @request.xhr? is true), I have
tried to redirect to another page or render to another page. When I do this,
the log says all the redirections/renders were successful, but I remain on
the same page. My rjs file at least does not execute though, which is good.
Any ideas on
2007 Jan 03
0
submit_form for Ajax via xhr
Railsters:
The assert_select system has a submit_form method that reads your
current page''s form, and submits all its fields with their data. This
works great for Test Driven Development because it tests your current
page''s form and your controller''s action at the same time.
Is there a submit_form that calls xhr, to submit a FORM thru Ajax? How
easy would that be to
2007 Jun 27
2
Controller specs not shareable?
Hi
I just wondered if there was a reason why Rails controller specs are
not shareable? eg
describe "All XHR POSTs to /gap/calculate_quote", :shared => true do
controller_name :gap
# ...
end
describe "XHR POST /gap/calculate_quote with valid details" do
it_should_behave_like "All XHR POSTs to /gap/calculate_quote"
# ...
end
blows up with
2009 Oct 14
6
Reinstantiate controller during functional testing
... ok, I may be going about this the wrong way, or perhaps, a less
efficient way than is optimal, but I would like to test a little bit
of AJAX on one of my web pages. When I test this by hand, I bring up
the page which shows a select box, I select an item from the drop down
list, see another select box show up, go back to the first select box,
select a different item, and see something
2010 Nov 17
3
How to use request helpers outside of controller specs?
I asked this questions on some other places before, but have found no
solution yet. I''d like to include the request helper (from
ActionDispatch::Integration::RequestHelpers, like post and xhr
methods) also in some specs outside of my controller specs. The
problem is that these request helpers are only included in spec/
controller and when a controller is described.
What do I have to
2015 Jul 31
2
EFI: HP + syslinux = crash
In another mail I discussed my adventures on netbooting syslinux 6.03
and newer from iPXE, either from an emulated rom on qemu/kvm/ovmf or by
chainloading via ipxe.efi onto a real HP Proliant DL360 gen9 piece of
iron. You might have asked yourself, why chainload? Why not load it
directly? Believe me, i tried.
First I had to 'fix' my dhcpd.conf because HP probably read the docs on
2015 Jun 11
2
EFI/PXE boot on Oracle X5-2
Hello all,
I am seeing the same symptoms described here by Holger Baust on
5-Feb-2015. The only differences in our setups that I can see are
that Mr. Baust claimed to be using HP DL380p Gen9, whereas I'm on
an Oracle X5-2, and Mr. Baust claimed to be using vlan tagging,
while I am not.
Boot log:
Copyright (C) 2014, Oracle and/or its affiliates. All rights reserved.
Version 2.16.1243.
2006 Feb 01
1
detecting whether a request comes from render_component
Hi All,
Anyone know if there is a way to detect whether a request came from a
render_component call? There isn''t anything obvious from looking at the
source, but it would be useful as I have set up a logging filter in my
application.rb, and I''d prefer to exclude all component renders, since
they just add extra lines to my log (I guess I could exclude identical
rows at the db