Project

General

Profile

Revision 4273

only include checked metadata

View differences:

lib/style/skins/first/search.js
4 4
    //var checkBox = document.getElementById("searchAll");
5 5
	var docId = submitFormObj.docid.value;
6 6
	
7
	alert("docId=" + docId);
7
	//alert("docId=" + docId);
8 8
	
9 9
	var metadataAttributes = "";
10 10
	var index = 0;
11 11
	for (var i=0; i < submitFormObj.length; i++) {
12 12
		var formElement = submitFormObj.elements[i];
13
		if (formElement.type == "checkbox") {
13
		if (formElement.type == "checkbox" && formElement.checked) {
14 14
		
15 15
			metadataAttributes += "<attribute index=\"";
16 16
			metadataAttributes += index;
......
44 44
					+ "<entity index=\"0\">"
45 45
						+ "<attribute index=\"0\"/>"
46 46
						+ "<attribute index=\"1\"/>"
47
						+ "<attribute index=\"2\"/>"
47
						//omit student id
48
						+ "<attribute index=\"3\"/>"
49
						+ "<attribute index=\"4\"/>"
48 50
					+ "</entity>"
49 51
				+ "</datapackage>"
50 52
				
......
71 73
		+ "</query>"
72 74
        + "</dataquery>";
73 75
         
74
         alert(submitFormObj.dataquery.value);
76
         //alert(submitFormObj.dataquery.value);
75 77
         
76 78
    return true;
77 79
}

Also available in: Unified diff