How do I do an LDAP query with JavaScript? -


trying make sidebar gadget has ldap query function, haven't been able find good, or any, useful documentation on matter. im not hugely experienced javascript, , know little nothing how ldap queries function, information @ useful.

info:

  • host: a.b.c.d.e
  • port: 389
  • ou: people
  • o: x_y_z
  • c: us

first snippet:

var ssearchurl = "ldap://a.b.c.d.e:389/o=x_y_z,c=us";                  var urlsuffix = "dc=" + form.searchdata.value;                  document.location = ssearchurl urlsuffix; 

other snippet:

 var ldap = getobject('ldap:');                     var ad = ldap.opendsobject('ldap://a.b.c.d.e:389/o=x_y_z',                          'cn=administrator,ou=people,o=rootname', 'password', 0); 

as long want run javascript in web browser, limited http protocol , domain script loaded in first place.

so, talking ldap server not possible web browsers javascript engine.

there javascript runtime environments have less limitations can implement socket servers , clients. ldap conenctivity you'd have write own library or find existing one.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -