Project

General

Profile

Revision 4495

pull out the IE/FF differences into common method that returns the document object for an iFrame (works with IE now!)

View differences:

first-assessment-resultset.xsl
61 61
			<![CDATA[
62 62
			downloadMergedResponseData = function(formId, fieldFormId) {
63 63
			
64
				//if (!areItemsSelected('docid')) {
65
				//	alert("Please select at least one dataset");
66
				//	return false;
67
				//}
68
								
69
				//transfer the assessmentItemId to this form
70
				//document.getElementById("questionId").value = document.getElementById("assessmentItemId").value;
71
				//alert("questionId: " + document.getElementById("questionId").value);
72
				
73 64
				var submitFormObj = document.getElementById(formId);
74 65
				submitFormObj.qformat.value = 'csv';
75 66
				submitFormObj.action.value = 'dataquery';
76 67
				
77 68
				//the form that holds the metadata field mappings - but in the header!
78 69
				var fieldFormObj = 
79
					window.document.getElementById("iframeheaderclass").contentDocument.getElementById(fieldFormId);
70
					getIframeDocument("iframeheaderclass").getElementById(fieldFormId);
80 71
				//alert("fieldFormObj: " + fieldFormObj);
81 72
				
82 73
				multipleAssessmentSearch(submitFormObj, fieldFormObj);
......
162 153
			}	
163 154
			isInCart = function(docid) {
164 155
		
165
				var iframe = window.document.getElementById("iframeheaderclass").contentDocument;
166
				var doc = iframe.contentDocument;
167
				if (!doc) {
168
					doc = iframe.contentWindow.document;
169
				}
156
				//look up the cart in the header
157
				var doc = getIframeDocument("iframeheaderclass");
170 158
				var objs = doc.getElementsByName("@packageId");
171 159
				
172
				//var objs = document.getElementsByName("@packageId");
173 160
				if (objs.length == 0) {
174 161
					return false;
175 162
				}
......
208 195
					hideDiv("ajaxDiv" + docid + "remove");
209 196
					showDiv("ajaxDiv" + docid + "add");
210 197
				}
211
			}	
198
			}
199
			
212 200
		 ]]>	
213 201
		</script>
214 202
        

Also available in: Unified diff