Isolates textual or numeric data that should not be hard-coded into the script component's scripts.
|
---|
<resource id="resourceID">
text or number here
</resource> |
Values
-
ResourceID
-
A unique identifier for the resource within the script component.
Remarks
Example
The following script component fragment defines a resource (called errNonNumeric) and demonstrates how to use it in script.
| Copy Code |
---|
<public>
<method name="random" internalName="getRandomNumber"/>
</public>
<resource id="errNonNumeric">
Non-numeric value passed
</resource>
<script language="VBScript">
<![CDATA[
Function getRandomNumber(upperBound)
If IsNumeric(upperBound) Then
getRandomNumber = Cint(upperBound * Rnd + 1)
Else
getRandomNumber=getResource("errNonNumeric")
End If
End Function
]]>
</script> |
See Also