cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
619
Views
0
Helpful
1
Replies

Function Invoking Another Function

Miriam Rubin
Level 1
Level 1

Trying to invoke 1 function from another function, using same parameters for each.

Trying to invoke 1 function from another function. MasterFunction has parameterX which is a dictionary Name. When attempting to call ChildFunction from within MasterFunction, and passing it the same parameter that MasterFunction has, got javascript error 'Invalid Object'.
Here is basic scenario:
MasterFunction(dictionaryName)
{
ChildFunction(dictionaryName);
}
Both of these functions are in the JavaScript function list.
Any help on this would be appreciated.

1 Reply 1

Tylor Hagerman
Level 1
Level 1

You need to pass the dictionary object, not the dictionary name.  So you would pass in a parameter of "serviceForm.DictName", which is the dictionary object.  Then, if your parameter name was "objDict", you would call methods against it, for example: "objDict.setVisible(false);" and "objDict.FieldName.getValue();"

If, for some reason, you do need or want to pass a string of the dictionary name, you need to use the "eval" method to get the dictionary object back: eval("serviceForm." + dictString + ".FieldName.getValue()");

Review Cisco Networking for a $25 gift card