18.01.2013 Views

VBScript Reference Manual for InduSoft Web Studio

VBScript Reference Manual for InduSoft Web Studio

VBScript Reference Manual for InduSoft Web Studio

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>InduSoft</strong> <strong>Web</strong> <strong>Studio</strong> <strong>VBScript</strong> <strong>Reference</strong> <strong>Manual</strong><br />

See Also CreateObject<br />

Example See Remarks<br />

GetRef<br />

Description Returns a reference to a DHTML procedure that can be bound to an event<br />

Usage Set object.eventname = GetRef(procname)<br />

Arguments object<br />

The name of a DHTML object to which a DHTML event is associated<br />

event<br />

Required. Name of the event to which the function is to be bound.<br />

procname<br />

Required. String containing the name of the Sub or Function procedure being associated<br />

with the event.<br />

Return A reference to a DHTML procedure<br />

Remarks The GetRef function allows you to connect a <strong>VBScript</strong> procedure (Function or Sub) to any<br />

available event on your DHTML (Dynamic HTML) pages. The DHTML object model provides<br />

in<strong>for</strong>mation about what events are available <strong>for</strong> its various objects. In other scripting and<br />

programming languages, the functionality provided by GetRef is referred to as a function pointer,<br />

that is, it points to the address of a procedure to be executed when the specified event occurs.<br />

Note: This function has limited applicability when used with IWS.<br />

Example: Function GetRefTest()<br />

Dim Splash<br />

Splash = "GetRefTest Version 1.0" & vbCrLf<br />

Splash = Splash & Chr(169) & " YourCompany"<br />

End Function<br />

Set Window.Onload = GetRef("GetRefTest")<br />

Hex<br />

Description Returns a string representing the hexadecimal value of a number.<br />

Usage strVal = Hex(number)<br />

Arguments number<br />

The number argument is any valid expression.<br />

Return A String Variant.<br />

Remarks Returns up to 8 characters. If number is not already a whole number, it is rounded to the nearest<br />

whole number be<strong>for</strong>e being evaluated. Null will be returned if number is Null.<br />

If number is Hex returns<br />

Null Null<br />

Empty Zero (0)<br />

Any other number Up to eight hexadecimal characters<br />

See Also Oct<br />

Example Dim MyHex<br />

MyHex = Hex(5) ' Returns 5.<br />

MyHex = Hex(10) ' Returns A.<br />

MyHex = Hex(459) ' Returns 1CB.<br />

<strong>InduSoft</strong>, Ltd. 137

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!