DDS JavaScript Search Examples

These examples show how to use the JavaScript Search Service to create a custom search interface and display ADN resources in an HTML page. Each example page highlights one or more of the possible functionalities of the service and can be used as a template to begin your own web page.

How to use these examples

To create a custom search web page, browse through the examples to find one that best matches the design and behavior you would like to use in your page. Once you've found an example that you like, do one of the following:

  1. Option one: Save the example page to your computer and edit it. To to this, first pull up the example in your browser and then choose 'File > Save As' from the browser 's menu and save the file as a single web page, HTML only. Alternatively, you may download all the examples from the download area on SourceForge to your computer as a package. After downloading, unpack the ZIP file to access the examples inside. Once you've got the HTML file saved on your computer, simply edit as desired.
  2. Option two: View the source code for the example page and then copy and paste it into an existing page your already have. To do this, first pull up the example in your browser and then choose the 'View > Source' command in your web browser. This will display the source code for the example. Then copy and paste the JavaScript and/or CSS portions of the code into your existing page. All of the <SCRIPT> code is required; the CSS <LINK> reference is recommended but optional.

After you are done developing your page, simply deploy the page to your web site as you would any other HTML page. There are no special requirements needed to install or deploy a JavaScript Search page to your web site.

Resources and additional documentation: