The widget

If you have javascript enabled then the tabbed interface you see on the sidebar to the left is the PSD widget!

The PSD widget is essentially a javascript file that uses the Dojo javascript libraries. The widget uses the PSD LDAP server as its data source by making calls to a webservice on the LDAP server.

The PSD widget javascript and CSS files provided here are beta quality code, and provide an example of how javascript can be used to dynamically display PSD data. The widget has been tested to work with the following browsers: Internet Explorer 5 & 6, Firefox 2, Safari 3. Note: The widget does not work in Internet Explorer 7 or Safari 2.

Follow these steps to install the PSD widget on your website:

  1. Download dojo 0.4.3 and extract/copy to your webserver directory.

  2. In the dojo directory, edit src/io/xip_client.html, uncomment the javascript tag and save the file. This enables cross-domain scripting with the PSD webservice.

  3. Download PSD widget javascript file and PSD widget css file (used to customise certain display aspects) and copy to your webserver directory.

  4. On the webpage where the widget is to appear, reference in the dojo.js, psdwidget.js, psdwidget.css file and create a div with id="psdwidget" that will turn into the widget (should the users browser have javascript enabled).

    View source of this page for an example. Note in the psdwidget div, is a simple link to the traditional PSD web-based search site psd.govt.nz. This is so users without javascript enabled still get a plain link instead of nothing.

  5. Please inform us if you are using (or considering using) the PSD widget on your site by using the feedback tab in the widget on this page. Please enter your email address and reason for using the widget. You can also use this to send us comments about the widget. You are free to download, use and modify the widget code to your needs however we request that you notify us of any improvments made.