asynchronous false implies synchronous
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6346 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -22,6 +22,7 @@
|
|||||||
var url = "ajax.txt";
|
var url = "ajax.txt";
|
||||||
function sendSynchronous(){
|
function sendSynchronous(){
|
||||||
var request = new OpenLayers.Ajax.Request(url, {
|
var request = new OpenLayers.Ajax.Request(url, {
|
||||||
|
'asynchronous': false,
|
||||||
onComplete: function() {
|
onComplete: function() {
|
||||||
document.getElementById('send_sync').value += 'request completed\n';
|
document.getElementById('send_sync').value += 'request completed\n';
|
||||||
}
|
}
|
||||||
@@ -30,7 +31,6 @@
|
|||||||
}
|
}
|
||||||
function sendAsynchronous(){
|
function sendAsynchronous(){
|
||||||
var request = new OpenLayers.Ajax.Request(url, {
|
var request = new OpenLayers.Ajax.Request(url, {
|
||||||
'asynchronous': false,
|
|
||||||
onComplete: function() {
|
onComplete: function() {
|
||||||
document.getElementById('send_sync').value += 'request completed\n';
|
document.getElementById('send_sync').value += 'request completed\n';
|
||||||
}
|
}
|
||||||
@@ -62,9 +62,9 @@
|
|||||||
<p><b></b></p>
|
<p><b></b></p>
|
||||||
<p>Clicking on the different buttons should give the following results in the textarea below :</p>
|
<p>Clicking on the different buttons should give the following results in the textarea below :</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>"other processing" then "request completed"</li>
|
<li>synchronous: "request completed" then "other processing"</li>
|
||||||
<li>"request completed" then "other processing"</li>
|
<li>asynchronous: "other processing" then "request completed"</li>
|
||||||
<li>"request aborted" then "other processing"</li>
|
<li>abort: "request aborted" then "other processing"</li>
|
||||||
</ul>
|
</ul>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user