I have an application that uses a mobile ad provider; the way ad provider works is that I make a request on the server side, the provider returns me the mark-up and I include that on my site. In order to make the load page faster (which is a requirement that I don’t control), I have an AJAX call to
Tag: ajax
Disable same origin policy in Chrome
Is there any way to disable the Same-origin policy on Google’s Chrome browser? Answer Close chrome (or chromium) and restart with the –disable-web-security argument. I just tested this and verified that I can access the contents of an iframe with src=”http://google.com” embedded in a page served from “localhost” (tested under chromium 5 / ubuntu). For me the exact command was:
How to upload string as file with jQuery or other js framework
Using javascript, I have a file in string (got with ajax request). How to upload it as file to server by another ajax request ? Answer You need to set the Content-type request header to multipart/form-data and play around with the format a little, I wrote this in Plain Ol’ JavaScript ™ but you could easily rework it for a
AJAX Problem – No response text in FireFox, but ok in IE
I am making a simple AJAX call to an external site. It works ok in IE, but in Firefox, not response text is returned. I think it might have something to do with the response being “chunked”, but I’m not sure. Any ideas? Thanks. Answer Is your page hosted at http://drc.edeliver.com.au also? If not, then you can’t make an XMLHttpRequest
browser back acts on nested iframe before the page itself – is there a way to avoid it?
I have a page with dynamic data loaded by some ajax and lots of javascript. the page contains a list from which the user can choose and each selected value loads new data to the page. One of these data items is a url provided to an iframe. I use jQuery BBQ: Back Button & Query Library to simulate the
When loading an html page via ajax, will script tags be loaded?
When you load an html document using AJAX, what does it do with the nodes inside the HEAD tag: (script,link,style,meta,title) ignore them or load and parse them? And in the case of jquery ‘s ajax() function? Answer When you call the jQuery.ajax() method, you can specify the dataType property, which describes what kind of data you are expecting from the
Stop the browser “throbber of doom” while loading comet/server push XMLHttpRequest
(This question is similar to this one, but it’s for using XMLHttpRequest instead of an iframe for Comet.) I’m starting an async long poll like this: If I do this inside <script>…</script> in the head, it will cause the document to keep loading forever. (I’m testing this in Safari on Mac OS X and the iPhone, and it’s the only
Determine when an user is typing
I am building a search box (input field) which should make a server call to filter a grid with the text being inserted on it but I need to make this in an smart way, I need to fire the server call only if the user has stopped. Right now I’m trying to implement it, but if someone knows how
Scroll to bottom of div?
I am creating a chat using Ajax requests and I’m trying to get messages div to scroll to the bottom without much luck. I am wrapping everything in this div: Is there a way to keep it scrolled to the bottom by default using JS? Is there a way to keep it scrolled to the bottom after an ajax request?