ImageGear.Web.Isis Namespace Client API Library > ImageGear.Web.Isis Namespace > ImGearIsisScanner class : getTag Method |
ASP.NET Ajax Javascript (Specification) | |
---|---|
function getTag( tagID : number(Integer), index : number(Integer), callback : function ) : ImGearIsisOperationStatus; |
ASP.NET Ajax Javascript (Usage) | |
---|---|
var resultVar = instanceOfImGearIsisScanner.getTag(number(Integer),number(Integer),function); |
The JavaScript code below demonstrates how to get a scanner ISIS tag, where pageSizeSelect is an HTML select element:
function getTagCallback(tagID, tagType, choices, tagValue, status) { if (status.get_status() !== ImageGear.Web.Isis.ImGearIsisStatus.Completed) { alert(status.get_statusMessage()); } var pageSizeSelect = document.getElementById("pageSizeSelect"); // The page sizes are provided as strings. The choices argument contains properties for getting the list of strings, integers, or numerators and // denominators or the minimum, maximum, and step values for a range of integers or numerators and denominators. The tagValue argument contains // properties for getting the current string value, integer value, or numerator and denominator values. You can check the tagType argument to // determine if the tag values are string, integer, or rational. You can check the choiceKind property of the choices argument to determine if // the tag values are provided as a range or in a list. See the ASP .NET ISIS sample for more code that demonstrates accessing the getTag callback // arguments for different tags. var stringList = choices.get_stringList(); for (var i = 0; i < stringList.get_length(); i++) { var tagString = stringList.getTagString(i); var option = document.createElement("option"); option.text = tagString; pageSizeSelect.add(option, null); } } scannerSession.get_scanner().getTag(ImageGear.Web.Isis.ImGearIsisTag.PageSize, 0, getTagCallback);
This is an asynchronous method.
The scanner must be set before calling this method.
For more information on ISIS tags, refer to the ISIS Tags topic.