An ajax request, or an XMLHttpRequest, is used in JavaScript to make additional requests from a server without reloading the page.
Questions tagged [ajax-request]
123 questions
8
votes
5 answers
Asp.net MVC - How to check session expire for Ajax request
We are using Ajax call across the application- trying to find out a global solution to redirect to login page if session is already expired while trying to execute any Ajax request. I have coded following solution taking help from this post -…

paul sim
- 463
- 2
- 10
- 23
8
votes
3 answers
How to disable a submit button when AJAX request is in progress and enable it after receiving success AJAX response?
I've following HTML code:
7
votes
1 answer
How to set a button enabled=false after clicking on it in Wicket?
What I want:
if I click on a button, it should be NOT enabled (not clickable)
BEFORE the other methods (in the clicking) would finish, only AFTER
the methods' end.
Here is my code to the button:
@Override
protected void onInitialize() {
…

victorio
- 6,224
- 24
- 77
- 113
6
votes
2 answers
AngularJS $resource custom headers
after a couple of understanding-problems, I have run into really hard probs. I can't get my custom headers to work on the $request from AngularJS. My definition looks like this:
$scope.re = $resource('/', {
callback: 'JSON_CALLBACK'
}, {
…

Preexo
- 2,102
- 5
- 29
- 37
4
votes
3 answers
Jquery ajax request showing a old response
Hi I have a jQuery ajax request for a login system. At first, it worked very well. But after a few try, it just started to show negative response. I checked firebug and it says that the response is, in my case "Connected". But the ajax response just…

Cedric
- 87
- 1
- 2
- 9
4
votes
1 answer
how to modify the value of the key 'X-requested-with' in the request headers of resource request in Android webview, but not a page request?
I have met a problem when I capture the http package when my webView visit a url. the package shows that the request send by ajax has a 'X-requested-with' key in the headers, which has the value of my app package name like 'com.xxx'. I don't want…

blank_ken
- 119
- 1
- 5
3
votes
2 answers
How to implement an ajax request queue using jQuery
What is the best way to implement an Ajax request queue using jQuery? Specifically, I want to accomplish the following:
A user triggers any number of Ajax requests within a web page, which need to be queued up and submitted sequentially.
The web…

Tony the Pony
- 40,327
- 71
- 187
- 281
3
votes
1 answer
How to set username and password in axios get method header
I want to fetch some data from a server via axios in my react project. When i put the url on browser and hit enter browser ask me username and password and after that, i can see the json data. But i dont know how to set the password and username in…

escalepion
- 641
- 2
- 7
- 17
3
votes
1 answer
.ajax() call always execute .fail() even after success in server side code (Web-api)
I have an ajax call to a web-api page (/api/attendances).
Its inserting a record , and return OK() as a result.
Issue: insert is done correctly ,and OK will be returned, but instead of .done()/success() function, it calls .Fail()/error() .
I…

Sara N
- 1,079
- 5
- 17
- 45
3
votes
2 answers
What is the best way to check if Ajax call is 200 OK if I'm returning the table?
I have a question about ajax success. So in previous situations I have returned Data something like ID but now in this case I'm returning entire table. So I would like to check if Ajax was successful(200 OK) before I retrieve my data. What is the…

espresso_coffee
- 5,980
- 11
- 83
- 193
3
votes
1 answer
Dynamic dropdown (select_tag) with Ruby on Rails
I've been trying to create 3 dynamic dropdown, wich the first change the content of the sencond and the second change the content of the thrid.
I haven't found an example for doing that, I found an example in which you send all the information to…

Leo
- 109
- 1
- 6
3
votes
7 answers
Ajax loader is not showing up in chrome
I am using an ajax loader (like a please-wait .gif image) image for the ajax calls. Before some days it was working perfectly and showing in chrome.
I didn't see any problem with the image or we don't change it. It is showing correctly in IE,…

nrsharma
- 2,532
- 3
- 20
- 36
3
votes
1 answer
multiple jquery fancyBox
I want to close fancyBox then immediately open new fancy box. But it didn't happen.
What actually happens is, it first displays alert and then closes the fancy boxes.
function OpenWindowNew_(type, URL, Namee) {
…

Mir Shakeel Hussain
- 517
- 6
- 19
2
votes
2 answers
After many ajax request the page is getting slower and can not be used
I use this ajax script :
$.ajaxSetup ({
// Disable caching of AJAX responses
cache: false
});
function getRandomInt() {
return Math.floor(Math.random() * Math.pow(10,6));
}
$(document).ready(function(){
…

Filip Ivanov
- 21
- 2