VBScript GetRef Function

Definition and Usage

The GetRef function can connect a VBScript procedure (subroutine) to a DHTML event on a page.

Syntax

Set object.event=GetRef(procname)
Parameters Description
object Required. The name of the object associated with the event.
event Required. The name of the event to be bound to the function.
procname Required. The name of the Sub or Function procedure associated with the event.

Example

Function test()
dim txt
txt="GetRef Test" & vbCrLf
txt=txt & "Hello World!"
MsgBox txt
End Function
Window.Onload=GetRef("test")