Keywords: ldapuses2_foils

Next: Second Static Web-mode Display Up: Extending Internet Services Via Previous: Dynamic Web-mode QLANADMIN Display

# [P2] Simple LDAP Query Using JavaScript

Another (static) web-based LDAP query tool, using very simple JavaScript coding to create an ``LDAP URL'', is similar to initial static web-based QLANADMIN.

- Uses simple HTML ``form'' to accept single user search value, using a single input field
- Uses simple JavaScript code to format a new ``LDAP'' URL

      var sSearchURL = "ldap://<LDAP host>/
        o=<ORG>,c=us??sub?";

      var URLsuffix = "dc=" + form.SearchData.value;

- Causes web browser to change to the new URL, which causes the LDAP query to be performed

  `document.location = sSearchURL` URLsuffix;

- Displays all data exactly as returned from LDAP server (``raw'' format)
- Easy and quick to develop, though result display is not the best
- Can provide LDAP access to user with no access to LDAP distribution
- Does not require an intermediate Web server