calgarychinese
MIS
Hi there
If I'm in a page and am trying to call a modal window dialog, I'll pass in some parameters. Now I do in javascript the following:
var objParam = new Object();
objParam.argParam1 = "A";
objParam.argParam2 = "B";
And in the modal window I process it like this in vbscript:
dim a, b
a = window.dialogArguments.argParam1
b = window.dialogArguments.argParam2
(Don't ask me why they're in the script languages that they are - the code existed long before I joined the company)
The above works bascially fine, except I have to add an optional parameter 3. So in the modal window I'll process it like argParam1 and argParam2, that is,
dim a, b,c
a = window.dialogArguments.argParam1
b = window.dialogArguments.argParam2
c = window.dialogArguments.argParam3
However since like I said it is optional, the calling page may or oay not pass in argParam3.
If I don't pass objParam.argParam3, in the modal window I'll get an error:
Object doesn't support this property or method:
window.dialogArguments.argParam3
So my question is, is there something I can check inside the modal window for the existence of argparam3 without prompting this error message? I know it's doable in javascript but it looks like I need to do my checking using vbscript, just want to know how I can handle that.
This is optional and only 5 out of the 100 places will require this argParam3. I don't want to have to go through the remaining 95 places to add in this argParam3 just so that it exists when the modal window is called.
Any help is appreciated.
Thanks
Calgarychinese
If I'm in a page and am trying to call a modal window dialog, I'll pass in some parameters. Now I do in javascript the following:
var objParam = new Object();
objParam.argParam1 = "A";
objParam.argParam2 = "B";
And in the modal window I process it like this in vbscript:
dim a, b
a = window.dialogArguments.argParam1
b = window.dialogArguments.argParam2
(Don't ask me why they're in the script languages that they are - the code existed long before I joined the company)
The above works bascially fine, except I have to add an optional parameter 3. So in the modal window I'll process it like argParam1 and argParam2, that is,
dim a, b,c
a = window.dialogArguments.argParam1
b = window.dialogArguments.argParam2
c = window.dialogArguments.argParam3
However since like I said it is optional, the calling page may or oay not pass in argParam3.
If I don't pass objParam.argParam3, in the modal window I'll get an error:
Object doesn't support this property or method:
window.dialogArguments.argParam3
So my question is, is there something I can check inside the modal window for the existence of argparam3 without prompting this error message? I know it's doable in javascript but it looks like I need to do my checking using vbscript, just want to know how I can handle that.
This is optional and only 5 out of the 100 places will require this argParam3. I don't want to have to go through the remaining 95 places to add in this argParam3 just so that it exists when the modal window is called.
Any help is appreciated.
Thanks
Calgarychinese