Returns a reference to a procedure that can be bound to an event.
Setobject.eventname = GetRef(procname)
The GetRef function syntax has these parts:
Required. Name of the object with which event is associated.
Required. Name of the event to which the function is to be bound.
Required. String containing the name of the Sub or Function procedure being associated with the event.
The GetRef function allows you to connect a VBScript procedure (Function or Sub) to any available event on your DHTML (Dynamic HTML) pages. The DHTML object model provides information about what events are available for its various objects.
In other scripting and programming languages, the functionality provided by GetRef is referred to as a function pointer, that is, it points to the address of a procedure to be executed when the specified event occurs.
The following example illustrates the use of the GetRef function:
Splash = "GetRefTest Version 1.0" & vbCrLf
Splash = Splash & Chr(169) & " YourCompany 1999 "
Set Window.Onload = GetRef("GetRefTest")