File size: 1,917 Bytes
a431caa |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# JavaScript Code Samples for O\*NET Web Services
`keyword_search.html` is a web page which demonstrates the occupation keyword search.
`keyword_search.js` provides the JavaScript code used in `keyword_search.html`.
`OnetWebService.js` is a utility class you may use in your own applications. This class, which is used by the keyword search example, uses the `fetch` API (in supported browsers) or `XMLHttpRequest` to connect to O\*NET Web Services.
## Running the example
**[Online Keyword Search Demo](https://onetcenter.github.io/web-services-samples/client-javascript/keyword_search.html)**
The example must be run from an HTTP server. You can use the copy [hosted on GitHub](https://onetcenter.github.io/web-services-samples/client-javascript/keyword_search.html), or upload the `.html` and `.js` files to a local or remote web server of your choice, and then load `keyword_search.html` in your browser.
Register the domain of your web server in your [O\*NET Web Services account settings](https://services.onetcenter.org/developer/editorigin). The domain you must register is shown on the demo page.
Enter your O\*NET Web Services username and click “Connect”. Then, enter your keyword search terms and click “Search”.
## License
This sample code is licensed under the terms of the MIT license (see the `LICENSE` file for details).
**Note:** O\*NET Web Services account holders must follow the [Terms of Service](https://services.onetcenter.org/terms) and [Data License](https://services.onetcenter.org/help/license_data) when calling the Services.
## Contact
For problems or suggestions related specifically to this sample code, please use [Issues](https://github.com/onetcenter/web-services-samples/issues/). For all other questions about O\*NET Web Services, including problems with your account, contact [O\*NET Customer Service](mailto:onet@onetcenter.org).
|