JScript  

Cannot assign to 'this'

[This is preliminary documentation and subject to change]

You attempted to assign a value to this. this is a JScript keyword that refers to either:

A method is a JScript function that is invoked through an object. Inside a method, the this keyword is a reference to the object the method was invoked through (which happens to be the object created by invoking the class constructor with the new operator).

Inside a method, you can use this to refer to the current object, but you cannot assign a new value to this.

To correct this error

Note   You cannot name a user-created variable this; it is a JScript reserved word.

See Also

This | Troubleshooting Your Scripts | JScript Language Reference