Project

General

Profile

« Previous | Next » 

Revision 2544

Added by sgarg over 19 years ago

Bug fix in the javascript code for the esa skin

View differences:

lib/style/skins/esa/index.html
42 42
        }
43 43

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

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

  
53
                if(checkBox.checked == false && searchString != "%"){
54
                        searchBox.name = "title";
55
                        submitFormObj.surName.value = searchString;
56
                        submitFormObj.givenName.value = searchString;
57
                        submitFormObj.keyword.value = searchString;
58
                        submitFormObj.title.value = searchString;
59
                        submitFormObj.organizationName.value = searchString;
60
                        submitFormObj.para.value = searchString;
61
                        submitFormObj.geographicDescription.value = searchString;
62
                        submitFormObj.literalLayout.value = searchString;
63
			submitFormObj.operator.value="UNION";
53
                if(checkBox.checked == false){
54
			if(searchString!="%"){
55
                        	searchBox.name = "title";
56
				searchBox.id = "searchBox";
57
			
58
                        	submitFormObj.surName.value = searchString;
59
	                        submitFormObj.givenName.value = searchString;
60
        	                submitFormObj.keyword.value = searchString;
61
                        	submitFormObj.organizationName.value = searchString;
62
	                        submitFormObj.para.value = searchString;
63
        	                submitFormObj.geographicDescription.value = searchString;
64
                	        submitFormObj.literalLayout.value = searchString;
65
				submitFormObj.operator.value="UNION";
66
	                        var abs = document.getElementById("abstract");
67
        	                abs.value=searchString;
68
			} else {
69
	                        searchBox.name = "anyfield";
70
				searchBox.id = "searchBox";
71
				submitFormObj.surName.value = "";
72
                                submitFormObj.givenName.value = "";
73
                                submitFormObj.keyword.value = "";
74
                                submitFormObj.organizationName.value = "";
75
                                submitFormObj.para.value = "";
76
                                submitFormObj.geographicDescription.value = "";
77
                                submitFormObj.literalLayout.value = "";
78
                                submitFormObj.operator.value="INTERSECT";
79
                                var abs = document.getElementById("abstract");
80
                                abs.value="";
81

  
82
			}
83
                } else {
84
                        searchBox.name = "anyfield";
85
			searchBox.id = "searchBox";
86
			submitFormObj.surName.value = "";
87
	                submitFormObj.givenName.value = "";
88
                        submitFormObj.keyword.value = "";
89
                        submitFormObj.organizationName.value = "";
90
                        submitFormObj.para.value = "";
91
                        submitFormObj.geographicDescription.value = "";
92
                        submitFormObj.literalLayout.value = "";
93
                        submitFormObj.operator.value="INTERSECT";
64 94
                        var abs = document.getElementById("abstract");
65
                        abs.value=searchString;
66
                }
95
                        abs.value="";
96
		}
67 97

  
68 98
                var knbCheckBox = document.getElementById("knbCheckBox");
69 99
                if(knbCheckBox.checked == true){

Also available in: Unified diff