Uiinfrastructure API Docs  
 

JSHelper.AddSafeJSVariable Method 

Helper function to define a safe javascript variable. The safe variable will be defined in its on javascript block, so it won't affect any other javascript if the assigned value is invalid. Reference it by using the javascript getSafeVariable or getSafeVariableWarn helper functions or GetSafeJSVariable or GetSafeJSVariableWarn java helper functions to generate the javascript calls. NOTE: The strValue is the string with the javascript value so don't surround it with quotes unless you want the value to be a string. E.g. strValue = "new Object()" - will assign a new object to the variable while strValue = "'new Object()'" - will assign the string 'new Object()'

public static HTMLScript AddSafeJSVariable(
   string strName,
   string strValue
);

Parameters

strName
strValue

Return Value

HTMLScript

See Also

JSHelper Class | com.plumtree.uiinfrastructure.statichelpers Namespace