Overview
With LabVIEW web services, we can respond to AJAX methods by utilizing the LabVIEW Web Services API and the Write response method. This is a fast and easy method to create dynamic web pages utilizing the LabVIEW web server.
Description
This short example demonstrates how we can use AJAX methods to get the windows login name of a particular user. AJAX sends an HTTP request, calling a LabVIEW web method that responds with the login data. We then set a text input field to the user name.
Steps to Implement or Execute Code
Requirements
Software:
LabVIEW 2013 or greater
Windows OS
Additional Images or Video
Snippet of javascript/ajax function embedded in html page
Web service snippet for get windows user name:
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.