Creado por John Ratzinger
hace más de 5 años
|
||
PHP:
correct code example
AJAX
asynchronous code
AJAX:
synchronous code:
various stages of a TCP connection is shown by...
AJAX:
readystate does not test success or failure
status must be tested after readystate:
Add code to implement the the following three messages (AJAX):
1.Loading, please wait
2.Successfully loaded
3.Error trying to fetch
By putting the status into its own IF block on the line after the readyState check, then this ensures this check has completed before check on Status
short JSON example
modules JSON example
prerequisites must be an array
semesters can be an integer with 3 permissible values.
AJAX jQuery
.click & .load example
AJAX “Request failed” message
AJAX “Awaiting response. . .” message
AJAX “Request complete” message
{
”title”: ”Home”,
”abstract”: ”Welcome to XYZ”,
”main-content”: ”some more text”
}
.getJSON for for above JSON data:
Write the relevant JavaScript/jQuery code to extract the maximum marks:
Add code to implement the the following three messages (jQUERY):
1.Loading, please wait
2.Successfully loaded
3.Error trying to fetch
.load() method (with ASO):
.load() method (without ASO):
jQuery “Please wait” message