Project

General

Profile

« Previous | Next » 

Revision 2543

Added by sgarg over 19 years ago

Following fixes to the ESA's index.html

> Changing the checkbox label to read 'Include data from the Knowledge Network for Biocomplexity'
> Change in Javascript so that KNB is searched when checkbox for Search KNB is clicked
-> Change so that the search term doesnt disappear after hitting the enter button.

View differences:

lib/style/skins/esa/index.html
44 44
        function checkSearch(submitFormObj) {
45 45
                var searchString = trim(submitFormObj.elements["anyfield"].value);
46 46
                var checkBox = document.getElementById("searchCheckBox");
47
                var searchBox = document.getElementById("searchBox");
47 48

  
48 49
                if (searchString=="") {
49 50
                        searchString="%";
50 51
                }
51 52

  
52 53
                if(checkBox.checked == false && searchString != "%"){
53
                        submitFormObj.anyfield.value = "";
54
                        submitFormObj.title.value = searchString;
54
                        searchBox.name = "title";
55 55
                        submitFormObj.surName.value = searchString;
56 56
                        submitFormObj.givenName.value = searchString;
57 57
                        submitFormObj.keyword.value = searchString;
......
64 64
                        var abs = document.getElementById("abstract");
65 65
                        abs.value=searchString;
66 66
                }
67

  
68
                var knbCheckBox = document.getElementById("knbCheckBox");
69
                if(knbCheckBox.checked == true){
70
                        document.forms[0].action = "http://knb.ecoinformatics.org/knb/servlet/metacat";
71
                }
72

  
73
                var actionField=document.createElement("input");
74
                actionField.setAttribute("type", "hidden");
75
                actionField.setAttribute("name", "action");
76
                actionField.setAttribute("value", "query");
77
                submitFormObj.appendChild(actionField);
78

  
67 79
                return true;
68 80
        }
69 81

  
......
110 122
    <menu>
111 123
<form method="POST" action="@servlet-path@" target="_top" onSubmit="return checkSearch(this)">
112 124
  <input value="INTERSECT" name="operator" type="hidden">   
113
  &nbsp;<input size="14" name="anyfield" type="text" value="">
125
  &nbsp;<input size="14" name="anyfield" type="text" value="" id="searchBox">
114 126
  <input type="hidden" name="organizationName">
115 127
  <input type="hidden" name="surName">
116 128
  <input type="hidden" name="givenName">
117 129
  <input type="hidden" name="keyword">
118
  <input type="hidden" name="title">
119 130
  <input type="hidden" name="para">
120 131
  <input type="hidden" name="geographicDescription">
121 132
  <input type="hidden" name="literalLayout">
122 133
  <input type="hidden" name="abstract/para" id="abstract">
123
  <input name="action" value="query" type="hidden">
124 134
  <input name="qformat" value="esa" type="hidden">
125 135
  <input name="enableediting" value="true" type="hidden">
126 136
  <input name="returnfield" value="originator/individualName/surName" type="hidden">
......
143 153
  <span class="regtext">Search All Fields</span>
144 154
  &nbsp;&nbsp;&nbsp;&nbsp;
145 155
  <input type="CHECKBOX" name="searchKNB" onClick="searchKNB()" id="knbCheckBox" >
146
  <span class="regtext">Search Knowledge Network for Biocomplexity</span>
156
  <span class="regtext">Include data from the Knowledge Network for Biocomplexity</span>
147 157
   <br><br>
148 158
      This tool allows you to search the registry for data 
149 159
      sets of interest. When you type text in the box and 

Also available in: Unified diff