# JavaScript

> Display documents in a plain HTML page: request an access token, load the DS Server viewer script with it and call TXDocumentViewer.init and loadDocument.

- **Product:** DS Server
- **Section:** Documentation
- **Kind:** Topic
- **Path:** DS Server > Getting Started > Document Viewer > JavaScript
- **Web URL:** https://docs.textcontrol.com/ds-server/getting-started/document-viewer/javascript/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/getting-started/document-viewer/javascript/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/getting-started/document-viewer/javascript/llms-full.txt

---

## On This Page

- [Prerequisites](https://docs.textcontrol.com/ds-server/getting-started/document-viewer/javascript/#prerequisites)
- [How the Page Works](https://docs.textcontrol.com/ds-server/getting-started/document-viewer/javascript/#how-the-page-works)
- [Prepare a Security Profile](https://docs.textcontrol.com/ds-server/getting-started/document-viewer/javascript/#prepare-a-security-profile)
- [Create the HTML Page](https://docs.textcontrol.com/ds-server/getting-started/document-viewer/javascript/#create-the-html-page)
- [Open the Page](https://docs.textcontrol.com/ds-server/getting-started/document-viewer/javascript/#open-the-page)
- [Load a Document With JavaScript](https://docs.textcontrol.com/ds-server/getting-started/document-viewer/javascript/#load-a-document-with-javascript)
- [Keep the Client Secret on Your Server](https://docs.textcontrol.com/ds-server/getting-started/document-viewer/javascript/#keep-the-client-secret-on-your-server)
- [Troubleshooting](https://docs.textcontrol.com/ds-server/getting-started/document-viewer/javascript/#troubleshooting)
- [Next Steps](https://docs.textcontrol.com/ds-server/getting-started/document-viewer/javascript/#next-steps)

---

## Nearby

- **Previous:** [React](https://docs.textcontrol.com/ds-server/getting-started/document-viewer/react/llms.txt)
- **Next:** [Administration and Settings](https://docs.textcontrol.com/ds-server/administration/llms.txt)
