PageSourceSearch

https://ncedc.org/js/ncss-catalog-select.js

js ncedc.org collected 2026-10-02 03:27:36 UTC 1,463 bytes, 41 lines download raw bytes

1// For NCSS catalog search page. Displays different output formats when 
2// different catalogs are selected. Written in jQuery. - JTaggart June 2018
3$(document).ready(function(){
4  $(".outputFormats").hide(); // Hide all the output formats, except NCSN
5  $("#outputncsn").show();
6  $("#ncread").prop("checked", true).click();
7  // When user selects a catalog, show appropriate output formats div and 
8  // hide others  
9  $("#myCatalog").change(function(){
10    var mySelection = $(this).val();
11    $(".outputFormats").hide();
12    if (mySelection== "ncsn"){
13      $('#outputncsn').show();
14      $("#ncread").prop("checked", true).click();
15    } else if (mySelection == "bdsn"){
16      $("#outputbdsn").show();
17      $("#bkread").prop("checked", true).click();
18    } else if (mySelection == "mech"){
19      $('#mech').show();
20      $("#ncfpraw").prop("checked", true).click();
21    } else if (mySelection == "double"){
22      $("#outputdouble").show();
23      $("#ddread").prop("checked", true).click();
24    }
25  });
26
27
28});
29
30// 2019/12/04 JTaggart Form options were out of sync when users clicked the
31// back button.  New browsers don't reload document, have to use pageshow 
32// instead. Also used autocomplete off in form element.
33$(window).bind("pageshow", function() {
34  // Had to add following line just for IE11
35  $("select#myCatalog").val("ncsn").change();
36  $(".outputFormats").hide();
37  $("#outputncsn").show();
38  $("#ncread").prop("checked", true).click();
39});
40
41

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.