Hi all,
I'm trying to modify this original function that is used to open a form when called:
and as you can see, the form name "mySDK" is located right in the beginning of the 2 lines.
What I want to do is to open more than one form instead by doing this:
however, an error is given "mySDK is undefined" as the function goes.
I tried to hard-code by replacing the For loop with this given form name as mySDK1, mySDK2:
and it works!
So, my question is... what's wrong here? why mySDK(x) doesn't work while mySDK1 is ok?
Please help!
I'm trying to modify this original function that is used to open a form when called:
Code:
function Do_Connect()
{
mySDK.WESPSDKMonitor.ClientPullingMode = 0;
mySDK.WESPSDKMonitor.Connect();
}
What I want to do is to open more than one form instead by doing this:
Code:
function Do_Connect()
{
var arrCams = Channel.value.split(",");
var x;
for (x=0;x<arrCams.length;x++) {
mySDK[arrCams[x]].WESPSDKMonitor.ClientPullingMode = 0;
mySDK[arrCams[x]].WESPSDKMonitor.Connect();
}
}
I tried to hard-code by replacing the For loop with this given form name as mySDK1, mySDK2:
Code:
function Do_Connect()
{
var arrCams = Channel.value.split(",");
var x;
for (x=0;x<arrCams.length;x++) {
mySDK1.WESPSDKMonitor.ClientPullingMode = 0;
mySDK1.WESPSDKMonitor.Connect();
mySDK2.WESPSDKMonitor.ClientPullingMode = 0;
mySDK2.WESPSDKMonitor.Connect();
}
}
So, my question is... what's wrong here? why mySDK(x) doesn't work while mySDK1 is ok?
Please help!