Avatar

Level 4

Hi there,

I would like to move most of my (javascript) event code to functions in script objects.

Now I simply can't find out how to pass "this" as a parameter to a function.

The naive way is certainly wrong:

sDummy = MyScriptObject.myFunction(this);


function myFunction(myObject) {

     return myObject.rawValue; }

Has anyone found a way to solve this?

It certainly would help to reuse code substantially.

Thanks in advance

Ulrich