Hello again,
I'm have some difficulty passing the contents of an array from the parent to child window.
I get an Object required '[string: "John Smith"]' error message when opening the child form.
main.hta code snippet:
And the child (modal) page:
The error is in the Set wArgs = window.dialogArguments line
If I remove 'Set' then the error is Type mismatch: 'wArgs'.
I'm a little stuck and being VBScript, there aren't alot of examples. In fact I only found one and I can't see why mine doesn't work. Example here.
Help!!!
Many thanks as always.
I'm have some difficulty passing the contents of an array from the parent to child window.
I get an Object required '[string: "John Smith"]' error message when opening the child form.
main.hta code snippet:
Code:
ElseIf arg = "openDGPage" Then
'oDictDialogArgs.Add "DisplayName", strDisplayName
'oDictDialogArgs.Add "cbCitrix",document.getElementById("cbCitrix").value
cbCtx = document.getElementById("cbCitrix").value
wArg = Array(cbCtx,strDisplayName)
Set retDG = ShowModalDialog("pages/DistributionGroupPage.hta",wArg,_
"toolbar=0,location=0,status=0,menubar=0,_
scrollbars=1,resizable=1,dialogHeight:1250px;dialogWidth:550px,top=200,left=200")
If IsEmpty(retDG)Then
MsgBox "You haven't selected any Distribution Groups!"
ElseIf Not IsEmpty(retDG) Then
For Each x In retDG
'MsgBox "Item: " & x & " " & retDG(x)
oSGDict2.Add "dg" & x, retDG(x)
Next
End If
And the child (modal) page:
Code:
Sub LoadPage()
Set wArgs = window.dialogArguments
DataAreaUser.innerHTML=wArgs(1)
MsgBox wArgs(0)
End Sub
The error is in the Set wArgs = window.dialogArguments line
If I remove 'Set' then the error is Type mismatch: 'wArgs'.
I'm a little stuck and being VBScript, there aren't alot of examples. In fact I only found one and I can't see why mine doesn't work. Example here.
Help!!!
Many thanks as always.