Questions tagged [ajax]
AJAX (Asynchronous JavaScript and XML) is a technique for creating interactive website user interfaces without the traditional web page refresh or reload. It uses asynchronous data exchange between client and server to update displayed information and respond to user interactions seamlessly. Include additional tags for programming languages, libraries, frameworks, web browsers, protocols and other environmental information.
17,048
questions
6709
votes
42
answers
2.1m
views
How do I return the response from an asynchronous call?
How do I return the response/result from a function foo that makes an asynchronous request?
I am trying to return the value from the callback, as well as assigning the result to a local variable ...
150
votes
8
answers
751k
views
Ways to circumvent the same-origin policy
The same origin policy
I wanted to make a community wiki regarding HTML/JS same-origin policies to hopefully help anyone searching for this topic. This is one of the most searched-for topics on SO ...
3148
votes
34
answers
1.5m
views
How can I upload files asynchronously with jQuery?
I would like to upload a file asynchronously with jQuery.
$(document).ready(function () {
$("#uploadbutton").click(function () {
var filename = $("#file").val();
$.ajax({...
352
votes
8
answers
376k
views
How should I use servlets and Ajax?
Whenever I print something inside the servlet and call it by the web browser, it returns a new page containing that text. Is there a way to print the text on the current page using Ajax?
I'm very new ...
871
votes
27
answers
1.8m
views
jQuery Ajax File Upload
Can I use the following jQuery code to perform file upload using POST method of an ajax request ?
$.ajax({
type: "POST",
timeout: 50000,
url: url,
data: dataString,
success: ...
759
votes
17
answers
1.8m
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="form.php" method="POST" id="foo">
<label for="bar">A bar</label>
&...
2174
votes
39
answers
3.6m
views
Disable same origin policy in Chrome
Is there any way to disable the Same-origin policy on Google's Chrome browser?
499
votes
26
answers
1.0m
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.DownAction">
<result name="success" type="stream">
<param name="...
929
votes
24
answers
882k
views
How can I make an AJAX call without jQuery?
How can I make an AJAX call using JavaScript, without using jQuery?
627
votes
14
answers
1.1m
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 possible to get the File-List with $('#fileinput').attr('files') but how is it possible to send this ...
156
votes
6
answers
185k
views
How to find out client ID of component for ajax update/render? Cannot find component with expression "foo" referenced from "bar"
The following code is inspired from PrimeFaces DataGrid + DataTable Tutorials and put into a <p:tab> of a <p:tabView> residing in a <p:layoutUnit> of a <p:layout>. Here is the ...
1999
votes
18
answers
716k
views
Abort Ajax requests using jQuery
Is it possible that using jQuery, I cancel/abort an Ajax request that I have not yet received the response from?
1091
votes
21
answers
2.6m
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.get or ajax or anything like that that would call a page through Ajax, and send along all ...
493
votes
15
answers
825k
views
jQuery AJAX cross domain
Here are two pages, test.php and testserver.php.
test.php
<script src="scripts/jq.js" type="text/javascript"></script>
<script>
$(function() {
$.ajax({...
84
votes
4
answers
57k
views
How to append whole set of model to formdata and obtain it in MVC
How do I pass a whole set model object through formdata and convert it to model type in the controller?
Below is what I've tried!
JavaScript part:
model = {
EventFromDate: fromDate,
...