Vizard 8 » Reference » Graphical user interfaces (GUIs) » HTML and web browsers » Local HTTP server and URLs
8.0

Local HTTP server and URLs

All the communication that occurs between Vizard and a browser or embedded HTML page, whether through forms or WebSocket messages, goes through a local HTTP server built into vizhtml. The commands listed in previous sections to display HTML in the embedded window and register HTML with the local HTTP server automatically start the server. The following table lists commands to manually start and stop the server and get it's base URL:

Command

Description

vizhtml.startServer()

Starts the local HTTP server.

vizhtml.stopServer()

Stops the local HTTP server.

vizhtml.getServerURL()

Gets the base URL of the local HTTP server.

The base URL of vizhtml's HTTP server is the default server port (8080) affixed to the computer name or IP address of the machine. The port can be modified by setting the vizhtml.port option before calling any vizhtml commands. See the Global settings page for information on setting options.

 

The full URL of a page on the server is a combination of the base URL of the server + /vizhtml/ + the page URL. For example, if the Vizard program is run on a computer with name 'Vizard-Renderer' and IP address '192.168.0.5' and the following line is used to register HTML code:

vizhtml.registerCode('form_submit',code)

then http://Vizard-Renderer:8080/vizhtml/form_submit or http://192.168.0.5:8080/vizhtml/form_submit should be entered into the URL window of a remote browser to display the page.

vizhtml introduction

HTML Forms in Vizard

HTML Forms in a remote browser

Collecting form data

Local HTTP server and URLs

WebSockets