search for: ajaxsetup

Displaying 7 results from an estimated 7 matches for "ajaxsetup".

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 invoked. This works great up until I get to wanting to call jQuery....
2010 Sep 23
8
HowTo; Rails 3, having Tabs that load content via jQuery ... No Page Refesh
Hello, I''m interested in learning the correct/smart approach for implementing a web page with tabs and a content panel... When the tab is clicked by the user the tab''s content is fetched and inserted with jQuery... no page refresh... Example, Facebook, when you click Photos or Events, it doesn''t refresh the browser, just replaces the content with AJAX in the
2013 Jan 16
0
Rails 3.2 jQuery JSONP request not working - Moved Permanently
...ale + "/administration/dashboards/remove_tag_named.json" type: "POST" dataType: "json" contentType: "json" data: {"tag_name": tagName } success: (result) -> selected.remove() I have also set an init js $.ajaxSetup beforeSend: (xhr) -> xhr.setRequestHeader "X-CSRF-Token", $("meta[name=\"csrf-token\"]").attr("content") and the console output : [23:18:24.424] POST http://localhost:3000/fr/administration/dashboards/remove_tag_named.json [HTTP/1.1 301 Moved Perm...
2011 May 25
0
Issues implementing jquery-form plugin for displaying image via an ajax call in my rails poc
...s/debug their root cause yet..I also understand that I would also need good knowledge on other things to fix this.. The current errors I am facing using firebug look something like this:- jQuery is not defined group.js?1306319739()group....6319739 (line 1) [Break on this error] jQuery.ajaxSetup({ group....6319739 (line 1) Ajax is not defined (?)(Object { name="e"})group....6319739 (line 43) handle(Object { name="a"})jquery...6302351 (line 63) add()jquery...6302351 (line 57) [Break on this error] dataType: ''script'' group.......
2009 Jul 12
3
RJS render errors when user clicks away before render completes
We have an issue where we are using RJS templates to render the results of Ajax calls. Everything works fine so long as the user waits for the render to occur. However, if the user initiates the request and the RJS template is still in the process of rendering, but hasn''t completed, and the user clicks a different link, then we get a Javascript alert popup "Unexpected Server
2009 Aug 23
4
Routing problems for different formats
I am having 2 similar problems with routing. 1. With Rails if I make a js request using jQuery I always have to append a ".js" extension to allow the request to be handled appropriately. If I don''t append a js extension I get html formatted data back. Using Merb this never happened and worked like I thought it should. 2. Today I am having problems allowing xml requests to be
2009 Feb 22
8
dynamically changing a form from POST/CREATE to PUT/UPDATE
For the life of me I can''t figure this one out, although I can''t find anyone else who''s attempted to do this, and probably with good reason. Context: blog using AJAX What I''m trying to do: when the user initially saves a blog entry, or when auto-saving, I want subsequent saves to not create a new blog entry Why I can''t just reload the partial: -