Uncaught TypeError: Cannot set property 'onreadystatechange' of undefined
at window.onload (test.js:4).
The above error message is what is displayed on the console while trying to run the ajax example on page 433 of the book. What can be done to rectify it? Any clue or answer will be appreciated.