If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

XMLHttpRequest onreadystatechange in an object

Hello everyone,

I'm new to javascript so I'm trying all kinds of stuff to get a hang of it. I'm used to OOP so that's what I'm trying to do in javascript. It's been going well but now I got stuck at some point. Here's the object I made:

The function in bold is the one that doesn't work right. Now, I guess the problem is that I'm "creating" that callback function in there, so it's not part of the object, therefore I cant use any methods or properties in the object. How should I go about doing this?

Basically.. knowledge of javascript I know the whole code is useless, I just wrote it to test creating an object, using variables in an object, calling methods in an object (and from within an object), assigning values to a variable with a method etc. Just my method of learning a new programming/scripting language; doing rather than just reading.