Ajax code not working after many tries

There happens to be just a simple typo here. Your code is
perfectly alright. just change this.readystate to this.readyStateLook Here for Reference