var scanners;
...
function getScannersCallback(connectedDevices, undetectedDevices, status) {
if (status.get_status() !== ImageGear.Web.Isis.ImGearIsisStatus.Completed) {
alert(status.get_statusMessage());
}
// Store the connected devices so they can be accessed later when calling the setScanner method.
scanners = connectedDevices;
var select = document.getElementById("scannerSelect");
for (var i = 0; i < connectedDevices.get_length(); i++) {
var scanner = connectedDevices.getScanner(i);
var option = document.createElement("option");
var scannerName = scanner.get_name();
option.text = scannerName;
select.add(option, null);
}
// Only devices that are connected and support the ISIS scanner auto-detection feature appear in the
// connectedDevices collection. Other devices appear in the undetectedDevices collection, which can be
// accessed using code similar to the code used above to access the connectedDevices collection.
}
// Get a list of connected scanners and add each to an HTML select element.
var operationStatus = scannerSession.getScanners(getScannersCallback);