Navigation

3/21/2014

Encore Search Box

Directions for installing Encore search box:  (Innovative Interfaces OPAC)


<script type="text/javascript">
   function searchEncore(){
        var encoreBaseURLInput,encoreBaseURL, searchInput, scopeInput, searchString, scopeString, locationHref, charRegExString, base64Regex;
       /*base64_encoding_map includes special characters that need to be
        encoded using base64 - these chars are "=","/", "\", "?"
        character : base64 encoded */
        var base64_encoding_map = {"=":"PQ==", "/": "Lw==", "\\":"XA==", "?":"Pw=="};

        var escapeRegExp = function(string) {
            return string.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
        }
       encoreBaseURLInput = document.getElementById("encoreBase");
       searchInput = document.getElementById("encoreSearchInput");

        if (searchInput && encoreBaseURLInput) {
            encoreBaseURL = encoreBaseURLInput.value;
            searchString = searchInput.value;
            for(var specialChar in base64_encoding_map) {
                charRegExString = escapeRegExp(specialChar);
                base64Regex = new RegExp(charRegExString, "g");
                searchString = searchString.replace(base64Regex, base64_encoding_map[specialChar])
            }
            searchString = encodeURIComponent(searchString);

            scopeInput = document.getElementById('encoreSearchLocation');

            if (scopeInput) {
                scopeString = scopeInput.value;
            }

            if (scopeString) {
                scopeString = encodeURIComponent(scopeString);
                locationHref = encoreBaseURL + "C__S" + searchString + scopeString +  "__Orightresult__U";
            } else {
                locationHref = encoreBaseURL + "C__S" + searchString + "__Orightresult__U";
            }
   
   languageSetting = document.getElementById("encoreLanguage");
   
   if (languageSetting) {
    locationHref = locationHref + "?lang=" + languageSetting.value;
   }
   
            window.location.href = locationHref;
        }
        return false;
    }
</script>
 
 
 
 
 
For Classic WebPAC:
 
 
<form style="padding-top: 15px;" action="http://columbo.law.cua.edu/search/~" method="get" name="quicksearch2" target="_blank" id="quicksearch2">
<select name="searchtype" >
<option value="X">Keyword</option>
<option value="t">Title</option>
<option value="a">Author</option>
<option value="d">Subject</option>
         </select> 
 
<input type="text" name="searcharg" style="font-size: 10pt;" size="35" maxlength="250" id="searcharg1" /> 
<input type="hidden" value="A" name="SORT" />
<input type="submit" value="Find It!"  /> 

</form>

No comments:

Post a Comment