search for: setrequestheader

Displaying 16 results from an estimated 16 matches for "setrequestheader".

2009 Jul 24
6
Routes from raw js (using XMLHttpRequest)
...; formid="assoc" + therow; makePOSTRequest(url, parameters, formid) } function makePOSTRequest(url, parameters, formid){ req3 = new XMLHttpRequest(); if (req3) { req3.onreadystatechange = alertContents(formid); req3.open(''POST'', url, true); req3.setRequestHeader("Content-type", "application/x-www-form- urlencoded"); req3.setRequestHeader("Content-length", parameters.length); req3.setRequestHeader("Connection", "close"); req3.send(parameters); } } function alertContents(formid) {...
2008 Apr 21
1
Ajax.request - SOAPAction
If I build my own XMLHttpRequest, I can do the following: this.xmlHttp.setRequestHeader("SOAPAction", ''updateClient''); How can I do the same with AjaxRequest()? var myAjax = new Ajax.Request( this.service, { method:''post'', postBody:soapXML, contentType:''text/xml&...
2008 Sep 25
2
jquery, format.js and IE
..., and I''m using the jQuery Form plugin to post to an iframe. The details of my ajax call: var options = { url: /pictures/1.js, iframe: true, beforeSubmit: prepImageArea, success: imageUploaded, dataType: ''script'', beforeSend: function(xhr) {xhr.setRequestHeader("Accept", "text/javascript")} } And my respond_to block: respond_to do |format| format.html { redirect_to edit_picture_path(@picture) } format.js { render :json => @picture.to_json(:methods => [:public_filename, :large_thumb]) } end Any sugge...
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
2006 Jan 26
0
XML Request in R: Pointers/examples needed
...ype=\"ds:SessionRequest\"> <ds:UserName>myusername</ds:UserName> <ds:Password>mypassword</ds:Password> </ds:Request> </ds:Requests>"; objRequest.open("POST","http://product.datastream.com/zappy/acces spoint.asp, false); objRequest.setRequestHeader ("DSXMLAPIREQUEST", request); objRequest.send(""); //Get the response XML. divResponse.innerText = objRequest.responseText } --> </script> ################################################################# Thank you Pierre Lapointe **********************************...
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.getJSON It appears that my ajaxSetup call causes the getJSON call to send...
2013 Jan 16
0
Rails 3.2 jQuery JSONP request not working - Moved Permanently
...ove_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 Permanently 46ms] [23:18:24.491] GET http://localhos...
2006 Jan 04
6
ajax in rails is a security violation
Does anybody have any issues with the AJAX code inside rails? Whenever i use any sites i have built, or even external sites (such as basecamphq) my internal security device blocks access to the Ajax piece with a 400 Bad Request ( i scoured the net for other ajax examples and no isses anywhere else). I think there is something in the AJAX code of rails that is not implemented correctly. Has
2009 Jul 16
2
[PATCH server] updated anyterm/ovirt integration
...tatus+":\n"+xmlhttp.statusText); + cbk(null); + } + } + } + if (method=="GET") { + xmlhttp.open(method, url+"?"+query, true); + xmlhttp.send(null); + } else if (method=="POST") { + xmlhttp.open(method, url, true); + xmlhttp.setRequestHeader('Content-Type', + 'application/x-www-form-urlencoded'); + xmlhttp.send(query); + } + + } +} + + +// Synchronous loader is a simple function + +function sync_load(url,query) { + var xmlhttp = new_XMLHttpRequest(); + if (method=="GET") { + xmlhttp.open...
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: -
2007 Apr 28
6
RESTful web service tutorial?
Hi, I would like to turn some of our simulation codes out to pasture and string some of them together by draping them in web services. I''m looking for a RESTful Camping tutorial to get started ... pointers appreciated. Some simple example applications: airfoil force calculator: feed it an airfoil geometry, an angle of attack, and a Mach number, and it returns the lift, drag, and
2011 May 25
0
Issues implementing jquery-form plugin for displaying image via an ajax call in my rails poc
...9;'script'' group....6319739 (line 43) $(this).ajaxSubmit is not a function [Break on this error] dataType: ''script'' My group.js file in public/javascripts is like this:- jQuery.ajaxSetup({ ''beforeSend'' : function(xhr) { xhr.setRequestHeader("Accept","text/javascript") } }) $(''#post_msg input'').val(''''); $(document).ready(function() { $(''#uploadForm'').bind(''submit'', function(e) { e.preventDefault(); $(this).ajaxSubmit({...
2010 Oct 01
0
Wine release 1.3.4
...se background when painting over supplied hdc. comctl32/listview: Use proper A/W call to measure item text string. comctl32/tab: Add a test for TCM_SETITEMEXTRA. msxml3/httprequest: Store passed data for IXMLHttpRequest::open(). msxml3/httprequest: Implement IXMLHttpRequest::setRequestHeader(). Paul Vriens (6): user32: Fix a typo. urlmon/tests: Fix test failures on Win9x/WinMe by using more A-functions. atl/tests: Fix a test failure on Win95. msi/tests: Prevent a popup on Windows NT. dbghelp: Fix use of GetProcessHeap. ddraw: Pass the correct size t...
2010 Aug 20
0
Wine release 1.3.1
...to separated function. mshtml: Moved headers parsing to separated function. mshtml: Allow customization of BeginningTransaction. mshtml: Store request headers in nsChannel if possible. mshtml: Added nsIChannel::GetRequestHeader implementation. mshtml: Added nsIChannel::SetRequestHeader implementation. mshtml: Store request method in nsChannel. mshtml: Added nsIChannel::GetRequestMethod implementation. mshtml: Added support for custom post data type. jscript: Use generic property for Error.description. jscript: Use generic property for Error.message....
2011 Aug 05
0
Wine release 1.3.26
...default user agent header. winhttp: Set WINHTTP_FLAG_SECURE if the scheme is https. winhttp: Implement IWinHttpRequest::GetAllResponseHeaders. winhttp: Add some parameter checks. winhttp: Implement IWinHttpRequest::GetResponseHeader. winhttp: Implement IWinHttpRequest::SetRequestHeader. winhttp: Add support for sending data with a request. winhttp: Include the extra info part of the URL in the request. winhttp: Don't send any data if the verb is GET. msi: Store table and column names in the string table. msi: Make the column and table name parame...