I have the LDAP server hostname and the s开发者_Go百科earch base, but have not been able to find any way of using that information with javascript. this is to be used in a windows sidebar gadget.
There is an example in this article that I used from Lothar Haeger's Password Notifier driver for Novell Identity Manager. He has an ECMA implementation of LDAP Search. That is basically what you are looking for, right? In the first link the code is in the article. In the second link, you would have to pick apart the driver XML to get the ECMA out.
Have you tried using LDAP via ActiveX? Something along the lines of:
var ldap = GetObject('LDAP:');
var ad = ldap.OpenDSObject('LDAP://servername:port/o=rootname',
'cn=Administrator,ou=Members,o=rootname', 'password', 0);
I adapted this code from the sample on MSDN here: http://support.microsoft.com/default.aspx?scid=kb;en-us;Q328024
The sample is in VBScript but it shouldn't be too tricky to change it to JScript.
精彩评论