How to retain variables from onLoad event?

G’day,

Is it possible to retain variable information after exiting an onLoad event?

I have a variable declared outside the onLoad event which a function called from within the onLoad event populates. The problem is, after leaving the onLoad event the variable gets cleared. Any solutions?

Cheers,
c