Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt with this JavaScript

 
Vijay Chandran
Ranch Hand
Posts: 186
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Dear friends,

When i execute this script in MS-IE 7.0 browser,
the Ready State 7: is alerted first and then the Ready State 6: is alerted. What is the reason behind this? I have started learning AJAX now.
Kindly clear my doubt.

Thanks & Regards,
Vijay
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What would you expect to happen here?



onreadystatechange is called when the readystate changes. When you call send, the readystate changes. It is just like calling the function foo in my example.

http://developer.apple.com/internet/webcontent/xmlhttpreq.html

Eric
 
Vijay Chandran
Ranch Hand
Posts: 186
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, Very silly doubt asked by me.

Thank you very much Eric for the response.

Regards,
Vijay
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is a very common question.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic