similar to: Saving State in Ajax Applications

Displaying 20 results from an estimated 7000 matches similar to: "Saving State in Ajax Applications"

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
2013 Sep 19
0
CRUD model in a bootstrap modal with jquery, ajax - best practice
Hi, i have an model, which i want to show edit and update in a dialog via ajax. What i do at the moment: To open the Modal and render the partial, i send an ajax request to controller#show with ujs this is the link: <a class="person-dialog" data-remote="true" data-type="script" href="/en/people/32" onclick="return false">Fidel
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
2006 Mar 29
0
MaxConnections in IE and Ajax.Request/Sortable
Hi all, IƤve built some functionality in a CMS where you can drag and drop small elements on the page between 2+ panes/containers/divs. Whenever a drag-drop event has occurred (onUpdate) I make a Ajax.Request to save the new layout in the CMS. The code is as follows: in an onload-function: var a = ["subcontent", "main"]; for (var i=0; id=a[i]; i++) { if ($(id)) {
2005 Sep 01
0
Multi-Page Websites VS AJAX
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 I found this to be quite interesting not sure if there are any plans for implementing it. The problem In a regular Multi Page Interface (MPI) website, each page has a unique URL. These URLs can be used to bookmark your location, and the browsing history is just a list of those URLs in the order you visit them. An AJAX application however has a
2012 Mar 07
1
link_to with :remote=>true works when bound to "click" but not "ajax:beforeSend"
Hi. I am trying to do an ajax link in Rails 3.2.1 and jQuery. I am loading jquery.js and jquery_ujs.js. In my document ready, if I bind to the event "click," clicking the link fires an event, but if I click to ajax:beforeSend, it doesn''t. Nothing happens when you click the link in JQuery. The event does go to the controller, though. Works: $(document).ready(function(){
2010 Sep 21
7
Ajax CSRF in Rails3
I''m using rails3. It does not seem to check the authenticity_token when doing a POST using Ajax. I traced this to: module ActionDispatch class Request < Rack::Request ..... def forgery_whitelisted? get? || xhr? || content_mime_type.nil? || ! content_mime_type.verify_request? end end so you don''t check if its a get? or a xhr? (ie ajax request). Is this correct? --
2010 Nov 06
0
Rails and JQuery and Ajax/Json question
Hi, I am using JQuery in my rails app. I''ve taken the approach outlined in Ryan Bates''s Railscast on jquery to do the following: jQuery.ajaxSetup({ ''beforeSend'' : function(xhr) {xhr.setRequestHeader("Accept", "text/javascript")} }); to set my ajax call request Headers to text/javascript so that my respond to block for javascript is
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
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
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
2003 May 15
1
Sendmail --- HELP!
I posted something about this a while ago and didn't get any response. I having a HUGE problem with sendmail. I'm clueless that sendmail is even down until I check the box. No mail comes in until I restart and even then sendmail doesn't stay up. Note: I have only been having this problem since FreeBSD 4.8. I have been doing the same setup for ages on all my boxes without
2003 Apr 28
1
Sendmail Issues
Hey All, I put up a new 4.8 box about a week ago. Mail was working fine for days and now all of a sudden it just keeps crashing or at least part of it is I think. I've been doing the same sendmail setup on all my boxes for ages and I've double-checked it all. I have even reinstalled sendmail and still no success. If I send mail from another box the mail does not arrive AND
2008 Mar 05
3
having trouble specing an ajax request
Do I need to spec an AR. If yes, what is the best way to spec this. here is the code - def index @deals = Deal.paginate(:all, :conditions => prepare_search_conditions, :order => ''created_at DESC'', :page => params[:page] ) if request.xhr? render :update do |page| page.replace_html "table", :partial =>
2009 Jun 14
3
Basic AJAX Response (Mootools)
Hi, I''ve done AJAX calls to Rails'' Controllers before yet never required to generate a response back to the view. In this respect, I have tried to keep it moronically simple and just add a node to see that it works, yet the response doesn''t come through / isn''t interpreted as it should. Long story short, code : // Have to use Mootools to integrate a
2008 Apr 10
2
Ajax Request Caching by Timestamp?
Hi everyone, first post here in the forum. I''m usually in #rubyonrails on freenode. I''ve been thinking about the various types of caching, and I was wondering if its possible to have the server selectively send back data, instead sending nothing ''0'' if user has the newest data. My example is a presence monitor, and it seems like the logic is: - Rails caches
2011 Mar 22
0
Error on ajax forms/links in jQuery UI tabs
I''ve implemented jQuery UI tabs, and I get an error: When i submit a ajax form or link, it gets submitted multiple times. As seen in this Doom console output: DELETE http://localhost:3000/innmeldings/101 404 (Not Found) DELETE http://localhost:3000/innmeldings/101 404 (Not Found) DELETE http://localhost:3000/innmeldings/101 404 (Not Found) DELETE http://localhost:3000/innmeldings/101
2007 Oct 23
0
new Ajax.Updater('about-content', 'rails/info/properties',
The default index page has a neat trick for dumping out environmental information. I would like to see how this works by looking at the code that the XHR gets back from rubyonrails.org, but I can''t figure out how. How do I look at this? Is it online in a browser visible way? Fred --~--~---------~--~----~------------~-------~--~----~ You received this message because you are
2006 Apr 19
1
AJAX - update item forms problem
I have a table showing some records from the database. These records should be always ordered by some datetime field. The list of items is changed by AJAX using RJS scripts and edits are done by showing and hiding an update form under a chosen row. Adding and updating rows works great but my problem is when the order of items is changed after making some AJAX datetime updates update forms of
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