Skip to content
Advertisement

Tag: ajax

Upload file with Ajax XMLHttpRequest

I am trying to send file with XMLHttpRequest with this code. I get this error: T The request was rejected because no multipart boundary was found. What am I doing wrong? Answer There is no such thing as xhr.file = file;; the file object is not supposed to be attached this way. xhr.send(file) doesn’t send the file. You have to

Browser Timeouts

Do browsers have built in timeouts and if so what are they? I have a page that does an AJAX call on a process that takes at most 5 minutes to run. Someone said browsers timeout after 2 minutes but didn’t know if there was any truth to that. Answer It’s browser dependent. “By default, Internet Explorer has a KeepAliveTimeout

How to convert a byte array into an image?

Using Javascript, I’m making an AJAX call to a WCF service, and it is returning a byte array. How can I convert that to an image and display it on the web page? Answer I realize this is an old thread, but I managed to do this through an AJAX call on a web service and thought I’d share… I

Download a file by jQuery.Ajax

I have a Struts2 action in the server side for file downloading. However when I call the action using the jQuery: in Firebug I see the data is retrieved with the Binary stream. I wonder how to open the file downloading window with which the user can save the file locally? Answer 2019 modern browsers update This is the approach

Load google maps v3 dynamically with ajax

When i try to load google maps v3 with ajax the result is: in the source code, i suppose that writes with javascript document.write(); how i can do this without iframe? thanks. Answer This is not supported. Please load the API using supported methods: http://code.google.com/apis/maps/documentation/javascript/tutorial.html#Loading_the_Maps_API

How to write this crawler in JavaScript?

The idea is very simple: Imagine a simple white page with a form with a single input tag (like Google homepage ). When I insert a link of a blog post in this form, then the javascript-crawler search the first image in the web page of the blog post (through ajax), show it in the white page and save it

Advertisement