Tag: r

50 votes
25 answers
2.8K views
Download a file by jQuery.Ajax

I have a Struts2 action in the server side for file downloading. <action name="download" class="com.xxx.Do

avatar
Mikki
0 1 0 9
asked 07 September, 2021
57 votes
14 answers
2.3K views
jQuery AJAX cross domain

Here are two pages, test.php and testserver.php. test.php <script src="scripts/jq.js" type="text/javascri

avatar
Hildegard
0 1 0 9
asked 07 September, 2021
60 votes
9 answers
1.9K views
jQuery get textarea text

Recently I have started playing with jQuery, and have been following a couple of tutorials. Now I feel slightl

avatar
Xavier
0 1 0 9
asked 07 September, 2021
59 votes
21 answers
2.4K views
How can I post data as form data instead of a request payload?

In the code below, the AngularJS $http method calls the URL, and submits the xsrf object as a "Request Payload

avatar
Sena
0 1 0 9
asked 07 September, 2021
55 votes
25 answers
697 views
Response to preflight request doesn&apos;t pass access control check

I'm getting this error using ngResource to call a REST API on Amazon Web Services: XMLHttpRequest cannot

avatar
Sydney
0 1 0 9
asked 07 September, 2021
57 votes
13 answers
1.4K views
On - window.location.hash - Change?

I am using Ajax and hash for navigation. Is there a way to check if the window.location.hash changed like th

avatar
Dorian
0 1 0 9
asked 07 September, 2021
59 votes
17 answers
730 views
How do I send a cross-domain POST request via JavaScript?

How do I send a cross-domain POST request via JavaScript? Notes - it shouldn't refresh the page, and I n

avatar
Margo
0 1 0 9
asked 07 September, 2021
55 votes
13 answers
2.1K views
Sending multipart/formdata with jQuery.ajax

I've got a problem sending a file to a serverside PHP-script using jQuery's ajax-function. It's

avatar
Robt
0 1 0 9
asked 07 September, 2021
51 votes
13 answers
1.6K views
Send POST data using XMLHttpRequest

I'd like to send some data using an XMLHttpRequest in JavaScript. Say I have the following form in HTML:

avatar
Jesenia
0 1 0 9
asked 07 September, 2021
62 votes
7 answers
1.8K views
Are the PUT, DELETE, HEAD, etc methods available in most web browsers?

I've seen a couple questions around here like How to debug RESTful services, which mentions: Unfortun

avatar
Wilber
0 1 0 9
asked 07 September, 2021
51 votes
6 answers
1.4K views
In MVC, how do I return a string result?

In my AJAX call, I want to return a string value back to the calling page. Should I use ActionResult or just

avatar
Trudy
0 1 0 9
asked 07 September, 2021
56 votes
17 answers
3K views
jQuery Ajax POST example with PHP

I am trying to send data from a form to a database. Here is the form I am using: <form name="foo" action="

avatar
Rudolf
0 1 0 9
asked 07 September, 2021
57 votes
22 answers
1.3K views
Wait until all jQuery Ajax requests are done?

How do I make a function wait until all jQuery Ajax requests are done inside another function? In short, I ne

avatar
Alphonso
0 1 0 9
asked 07 September, 2021
53 votes
21 answers
2.2K views
jQuery Ajax error handling, show custom exception messages

Is there some way I can show custom exception messages as an alert in my jQuery AJAX error message? For examp

avatar
Cortez
0 1 0 9
asked 07 September, 2021
55 votes
26 answers
2.9K views
jQuery Ajax File Upload

Can I use the following jQuery code to perform file upload using POST method of an ajax request ? $.ajax({

avatar
Percy
0 1 0 9
asked 07 September, 2021
60 votes
24 answers
2.4K views
How to make an AJAX call without jQuery?

How to make an AJAX call using JavaScript, without using jQuery?

avatar
Jefferey
0 1 0 9
asked 07 September, 2021
63 votes
16 answers
1.9K views
Ajax request returns 200 OK, but an error event is fired instead of success

I have implemented an Ajax request on my website, and I am calling the endpoint from a webpage. It always retu

avatar
Venice
0 1 0 9
asked 07 September, 2021
55 votes
30 answers
352 views
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 witho

avatar
Fabian
0 1 0 9
asked 07 September, 2021
59 votes
20 answers
2K views
jQuery AJAX submit form

I have a form with name orderproductForm and an undefined number of inputs. I want to do some kind of jQuery.

avatar
Keith
0 1 0 9
asked 07 September, 2021
56 votes
25 answers
1.8K views
Is Safari on iOS 6 caching $.ajax results?

Since the upgrade to iOS 6, we are seeing Safari's web view take the liberty of caching $.ajax calls. Thi

avatar
Luis
0 1 0 9
asked 07 September, 2021