Newsletter |
Ajax onreadystatechange Event Of XMLHttpRequest Object
Ajax » on Oct 5, 2011 { 12 Comments } By Sivateja
Once the request been sent to the server, changes will happen in the current webpage based on the response only. The onreadystatechange event will be triggered every time the readyState changes.
Here the properties of XMLHttpRequest object
onreadystatechange
A function will be stored and will be called automatically each time readyState property changes
readyState
0 – request not initialized
1 – connection been established with the server
2 – request received from the server
3 – request being processing
4 – request finished and response is ready
status
200 : ok
404 : page not found, it’s normal 404 error
So, readyState = 4 & status = 200 then every thing will be perfect, i mean we got the response from the server, and our webpage will be modified with the response text/xml.
You Might Also Like
::. About the Author .:: | ||
Comments
12 Responses to “Ajax onreadystatechange Event Of XMLHttpRequest Object”
I genuinely appreciate your work , Great post.
10q…..ajax tutorial is awesome and easy to learn….once again my heartfull 10qssssssss
@sankar, @Stacy Montooth You welcome friends
I think this is the best site to learn ajax ….awesome ….. Thank u friend..
tnx Siva Teja. dis is d easiest way to learn ajax …awesome..THE BEST..
Thank you team. Ajax info is useful.
great Siva…its a nice website to learn Ajax and other technology related to Java…
keep on.. going..to share your knowledge..
if u give some java related project scenario and also code to write..then most java learner will get benefited.
I wnat to get the data from database, and insert into database and delete from the data base using ajax and servlets……………..
How can i do?
database table name:dept(dname, description)
conditions:
1. display results using check box
2. If i click on more than one check box then it will be deleted from browser display results as well as deleted from the database also…………
Thank u so much we are providing best services to the all employees and students who are really searching for the job
Hello sir onreadystatechange is listener or event. Because from some site I read it is a listener register with XMLHttpRequest object. If any event occur on this object the listener will be invoked. Plz explain.
http://howtodoinjava.com/2013/06/21/complete-ajax-tutorial/
I really want say thanks from bottom heart .you did great job .
thank you so much.
Manish
Superb work….It's easy to learn ajax by following this 🙂