PageSourceSearch

https://cfadatabase.org/CFA/js/cfaUtils.js

js cfadatabase.org collected 2026-10-08 07:17:26 UTC 2,066 bytes, 84 lines download raw bytes

1
2function HookupAutocomplete(ctl) {
3    ctl.autocomplete("Handlers/CompanyNames.ashx", {
4        formatItem: function (data, i, n, value) {
5            return value.split("=>")[0];
6        },
7        formatResult: function (data, value) {
8            return value.split("=>")[0];
9        },
10        max: 30
11    });
12}
13
14function HookupAutocomplete2(ctl) {
15    var options = {
16        url: function (expr) {
17            return "Handlers/CompanyNames2.ashx?term=" + expr + "&format=json";
18        },
19        getValue: "label",
20        requestDelay: 250,
21        minCharNumber: 2,
22        list: {
23            match: {
24                enabled: true
25            },
26            sort: {
27                enabled: true
28            },
29            maxNumberOfElements: 10
30        }
31    };
32
33    ctl.easyAutocomplete(options);
34}
35
36function HookupAutocompleteJQ(ctl) {
37    ctl.autocomplete({
38        source: "Handlers/CompanyNamesJQ.ashx",
39        minLength: 2
40    });
41
42    //ctl.autocomplete({
43    //    source: "Handlers/CompanyNamesJQ.ashx",
44    //    minLength: 2,
45    //    select: function (event, ui) {
46    //    }
47    //});
48}
49
50function BlockUI(msg) {
51    $.blockUI({ message: '<div style="padding: 5px;font-weight:700; font-size: 15px;">' + msg + "</div>" })
52}
53
54function isMSIE() {
55
56    var ua = window.navigator.userAgent;
57    var msie = ua.indexOf("MSIE ");
58
59    if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./))  // If Internet Explorer, return version number
60    {
61        return true;
62    }
63    else  // Another browser
64    {
65        return false;
66    }
67}
68
69function msieversion() {
70
71    var ua = window.navigator.userAgent;
72    var msie = ua.indexOf("MSIE ");
73
74    if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./))  // If Internet Explorer, return version number
75    {
76        alert(parseInt(ua.substring(msie + 5, ua.indexOf(".", msie))));
77    }
78    else  // If another browser, return 0
79    {
80        alert('otherbrowser');
81    }
82
83    return false;
84}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.