Anyone ever used vbscript or javascript in a web browser to open the DocOpenDlg for desksite?
I am successfull at accessing the dialog, trusted login, I can see all of the servers and my worklist, however, I cannot access the list of document(s) that the user selects.
(note: this code works without a problem when used in Windows Forms)
Any advice would be helpful.
Thanks.
Here is an example:
<html>
<head>
<title>HTMLPage1</title>
<script language="vbscript">
Dim arr(3)
dim objNRTDMS
dim sessions
dim d
dim arrAdvancedOptionsList(0)
dim obj
dim obj2
arr(0) = "
@1@&Open"
arr(1) = "
@2@Open &Copy"
arr(2) = "
@3@&View"
arr(3) = "
@4@&Properties"
arrAdvancedOptionsList(0) = "
@ShowWorklistPerDatabase@Y"Set objNRTDMS = CreateObject("IManage.NRTDMS")
Set d = CreateObject("IIntegrationDlg.DocOpenDlg")
Set sessions = objNRTDMS.Sessions
sessions.Add( enter_server_name )
sessions.Item(1).TrustedLogin()
sub f()
d.NRTDMS = objNRTDMS
d.SingleSel = true
d.CloseOnOK = true
d.Caption = "Pick a file"
obj = arr
d.CommandList=obj
d.Show(0)
dim lActionSelected
lActionSelected = d.CommandSelected
if (lActionSelected = -1) then
else
msgbox("Document has been selected.")
' Get Selected documents
dim iManDoc
' Error occurs here, d.DocumentList is empty
iManDoc = d.DocumentList
end if
end sub
//-->
</script>
</head>
<body>
<INPUT id="Button1" onclick="f()" type="button" value="Button" name="Button1">
</body>
</html>