views:

162

answers:

1

trying to make a sidebar gadget that has an ldap query function, but haven't been able to find very good, or any, useful documentation on the matter. im not hugely experienced with javascript, and know little to nothing about how ldap queries function, so any information at all would be 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);
A: 

As long as you want to run your JavaScript in a web browser, you are limited to the HTTP protocol and to the domain from which your script was loaded in the first place.

So, talking to an LDAP server will not be possible from a web browsers JavaScript engine.

There are JavaScript runtime environments that have less limitations where you can implement socket servers and clients. For LDAP conenctivity you'd have to write your own library or find some existing one.

Techpriester
unfortunate, but thanks for an answer.
jake