Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
666cc900
Commit
666cc900
authored
Dec 29, 2006
by
Jörn Zaefferer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for #534
parent
b8d46f7b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
ajax.js
src/ajax/ajax.js
+4
-0
ajaxTest.js
src/ajax/ajaxTest.js
+2
-1
No files found.
src/ajax/ajax.js
View file @
666cc900
...
@@ -714,6 +714,10 @@ jQuery.extend({
...
@@ -714,6 +714,10 @@ jQuery.extend({
jQuery
.
handleError
(
s
,
xml
,
null
,
e
);
jQuery
.
handleError
(
s
,
xml
,
null
,
e
);
}
}
// firefox 1.5 doesn't fire statechange for sync requests
if
(
!
s
.
async
)
onreadystatechange
();
// return XMLHttpRequest to allow aborting the request etc.
// return XMLHttpRequest to allow aborting the request etc.
return
xml2
;
return
xml2
;
},
},
...
...
src/ajax/ajaxTest.js
View file @
666cc900
...
@@ -44,8 +44,9 @@ test("synchronous request", function() {
...
@@ -44,8 +44,9 @@ test("synchronous request", function() {
});
});
test
(
"synchronous request with callbacks"
,
function
()
{
test
(
"synchronous request with callbacks"
,
function
()
{
expect
(
2
);
var
result
;
var
result
;
$
.
ajax
({
url
:
"data/json.php"
,
async
:
false
,
success
:
function
(
data
)
{
result
=
data
;
}
});
$
.
ajax
({
url
:
"data/json.php"
,
async
:
false
,
success
:
function
(
data
)
{
ok
(
true
,
"sucess callback executed"
);
result
=
data
;
}
});
ok
(
/^{ "data"/
.
test
(
result
),
"check returned text"
);
ok
(
/^{ "data"/
.
test
(
result
),
"check returned text"
);
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment