Subversion Repositories Applications.papyrus

Rev

Rev 1372 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1372 Rev 1422
1
<!--
1
<!--
2
	/*
2
	/*
3
		Copyright (c) 2004-2006, The Dojo Foundation
3
		Copyright (c) 2004-2006, The Dojo Foundation
4
		All Rights Reserved.
4
		All Rights Reserved.
5
	
5
	
6
		Licensed under the Academic Free License version 2.1 or above OR the
6
		Licensed under the Academic Free License version 2.1 or above OR the
7
		modified BSD license. For more information on Dojo licensing, see:
7
		modified BSD license. For more information on Dojo licensing, see:
8
	
8
	
9
			http://dojotoolkit.org/community/licensing.shtml
9
			http://dojotoolkit.org/community/licensing.shtml
10
	*/
10
	*/
11
	Pieces taken from Dojo source to make this file stand-alone
11
	Pieces taken from Dojo source to make this file stand-alone
12
-->
12
-->
13
<html>
13
<html>
14
<head>
14
<head>
15
	<title></title>
15
	<title></title>
16
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
16
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
17
	<script type="text/javascript" src="isAllowed.js"></script>
17
	<script type="text/javascript" src="isAllowed.js"></script>
18
	<!--
18
	<!--
19
	BY DEFAULT THIS FILE DOES NOT WORK SO THAT YOU DON'T ACCIDENTALLY EXPOSE
19
	BY DEFAULT THIS FILE DOES NOT WORK SO THAT YOU DON'T ACCIDENTALLY EXPOSE
20
	ALL OF YOUR XHR-ENABLED SERVICES ON YOUR SITE. 
20
	ALL OF YOUR XHR-ENABLED SERVICES ON YOUR SITE. 
-
 
21
	
21
	
22
	In order for this file to work, you need to uncomment the script element,
22
	In order for this file to work, you should define a function with the following signature:
23
	and you should define a function with the following signature:
23
	
24
	
24
	function isAllowedRequest(request){
25
	function isAllowedRequest(request){
25
		return false;	
26
		return false;	
26
	}
27
	}
27
	
28
	
28
	Return true out of the function if you want to allow the cross-domain request.
29
	Return true out of the function if you want to allow the cross-domain request.
29
	
30
	
30
	DON'T DEFINE THIS FUNCTION IN THIS FILE! Define it in a separate file called isAllowed.js
31
	DON'T DEFINE THIS FUNCTION IN THIS FILE! Define it in a separate file called isAllowed.js
31
	and include it in this page with a script tag that has a src attribute pointing to the file.
32
	and include it in this page with a script tag that has a src attribute pointing to the file.
32
	See the very first script tag in this file for an example. You do not have to place the
33
	See the very first script tag in this file for an example. You do not have to place the
33
	script file in the same directory as this file, just update the path above if you move it
34
	script file in the same directory as this file, just update the path above if you move it
34
	somewhere else.
35
	somewhere else.
35
	
36
	
36
	Customize the isAllowedRequest function to restrict what types of requests are allowed
37
	Customize the isAllowedRequest function to restrict what types of requests are allowed
37
	for this server. The request object has the following properties:
38
	for this server. The request object has the following properties:
38
	- requestHeaders: an object with the request headers that are to be added to
39
	- requestHeaders: an object with the request headers that are to be added to
39
	                  the XHR request.
40
	                  the XHR request.
40
	- method: the HTTP method (GET, POST, etc...)
41
	- method: the HTTP method (GET, POST, etc...)
41
	- uri: The URI for the request.
42
	- uri: The URI for the request.
42
	- data: The URL-encoded data for the request. For a GET request, this would
43
	- data: The URL-encoded data for the request. For a GET request, this would
43
	        be the querystring parameters. For a POST request, it wll be the
44
	        be the querystring parameters. For a POST request, it wll be the
44
	        body data.
45
	        body data.
45
	        
46
	        
46
	See xip_client.html for more info on the xip fragment identifier protocol.	
47
	See xip_client.html for more info on the xip fragment identifier protocol.	
47
	-->
48
	-->
48
	<script type="text/javascript">
-
 
49
	// <!--
-
 
50
	djConfig = {
-
 
51
		parseWidgets: false,
-
 
52
		baseScriptUri: "./"
-
 
53
	}
49
	
54
	// -->
-
 
55
	</script>
50
	<!-- Security protection: uncomment the script tag to enable. -->
56
	<script type="text/javascript">
51
	<!-- script type="text/javascript" -->
57
	// <!--
52
	// <!--
58
		//Core XHR handling taken from Dojo IO code.
53
		//Core XHR handling taken from Dojo IO code.
59
		dojo = {};
54
		dojo = {};
60
		dojo.hostenv = {};
55
		dojo.hostenv = {};
61
		// These are in order of decreasing likelihood; this will change in time.
56
		// These are in order of decreasing likelihood; this will change in time.
62
		dojo.hostenv._XMLHTTP_PROGIDS = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'];
57
		dojo.hostenv._XMLHTTP_PROGIDS = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'];
63
		
58
		
64
		dojo.hostenv.getXmlhttpObject = function(){
59
		dojo.hostenv.getXmlhttpObject = function(){
65
				var http = null;
60
				var http = null;
66
			var last_e = null;
61
			var last_e = null;
67
			try{ http = new XMLHttpRequest(); }catch(e){}
62
			try{ http = new XMLHttpRequest(); }catch(e){}
68
				if(!http){
63
				if(!http){
69
				for(var i=0; i<3; ++i){
64
				for(var i=0; i<3; ++i){
70
					var progid = dojo.hostenv._XMLHTTP_PROGIDS[i];
65
					var progid = dojo.hostenv._XMLHTTP_PROGIDS[i];
71
					try{
66
					try{
72
						http = new ActiveXObject(progid);
67
						http = new ActiveXObject(progid);
73
					}catch(e){
68
					}catch(e){
74
						last_e = e;
69
						last_e = e;
75
					}
70
					}
76
		
71
		
77
					if(http){
72
					if(http){
78
						dojo.hostenv._XMLHTTP_PROGIDS = [progid];  // so faster next time
73
						dojo.hostenv._XMLHTTP_PROGIDS = [progid];  // so faster next time
79
						break;
74
						break;
80
					}
75
					}
81
				}
76
				}
82
		
77
		
83
				/*if(http && !http.toString) {
78
				/*if(http && !http.toString) {
84
					http.toString = function() { "[object XMLHttpRequest]"; }
79
					http.toString = function() { "[object XMLHttpRequest]"; }
85
				}*/
80
				}*/
86
			}
81
			}
87
		
82
		
88
			if(!http){
83
			if(!http){
89
				throw "xip_server.html: XMLHTTP not available: " + last_e;
84
				throw "xip_server.html: XMLHTTP not available: " + last_e;
90
			}
85
			}
91
		
86
		
92
			return http;
87
			return http;
93
		}
88
		}
94
 
89
 
95
		dojo.setHeaders = function(http, headers){
90
		dojo.setHeaders = function(http, headers){
96
			if(headers) {
91
			if(headers) {
97
				for(var header in headers) {
92
				for(var header in headers) {
98
					var headerValue = headers[header];
93
					var headerValue = headers[header];
99
					http.setRequestHeader(header, headerValue);
94
					http.setRequestHeader(header, headerValue);
100
				}
95
				}
101
			}
96
			}
102
		}
97
		}
103
 
98
 
104
	//MSIE has the lowest limit for URLs with fragment identifiers,
99
	//MSIE has the lowest limit for URLs with fragment identifiers,
105
	//at around 4K. Choosing a slightly smaller number for good measure.
100
	//at around 4K. Choosing a slightly smaller number for good measure.
106
	xipUrlLimit = 4000;
101
	xipUrlLimit = 4000;
107
	xipIdCounter = 1;
102
	xipIdCounter = 1;
108
 
103
 
109
	function xipServerInit(){
104
	function xipServerInit(){
110
		xipStateId = "";
105
		xipStateId = "";
111
		xipCurrentHash = "";
106
		xipCurrentHash = "";
112
		xipRequestMessage = "";
107
		xipRequestMessage = "";
113
		xipResponseParts = [];
108
		xipResponseParts = [];
114
		xipPartIndex = 0;
109
		xipPartIndex = 0;
115
	}
110
	}
116
 
111
 
117
	function pollHash(){
112
	function pollHash(){
118
		//Can't use location.hash because at least Firefox does a decodeURIComponent on it.
113
		//Can't use location.hash because at least Firefox does a decodeURIComponent on it.
119
		var urlParts = window.location.href.split("#");
114
		var urlParts = window.location.href.split("#");
120
		if(urlParts.length == 2){
115
		if(urlParts.length == 2){
121
			var newHash = urlParts[1];
116
			var newHash = urlParts[1];
122
			if(newHash != xipCurrentHash){
117
			if(newHash != xipCurrentHash){
123
				try{
118
				try{
124
					messageReceived(newHash);
119
					messageReceived(newHash);
125
				}catch(e){
120
				}catch(e){
126
					//Make sure to not keep processing the error hash value.
121
					//Make sure to not keep processing the error hash value.
127
					xipCurrentHash = newHash;
122
					xipCurrentHash = newHash;
128
					throw e;
123
					throw e;
129
				}
124
				}
130
				xipCurrentHash = newHash;
125
				xipCurrentHash = newHash;
131
			}
126
			}
132
		}
127
		}
133
	}
128
	}
134
 
129
 
135
	function messageReceived(encodedData){
130
	function messageReceived(encodedData){
136
		var msg = unpackMessage(encodedData);
131
		var msg = unpackMessage(encodedData);
137
		
132
		
138
		switch(msg.command){
133
		switch(msg.command){
139
			case "ok":
134
			case "ok":
140
				sendResponsePart();
135
				sendResponsePart();
141
				break;
136
				break;
142
			case "start":
137
			case "start":
143
				xipRequestMessage = "";
138
				xipRequestMessage = "";
144
				xipRequestMessage += msg.message;
139
				xipRequestMessage += msg.message;
145
				setClientUrl("ok");
140
				setClientUrl("ok");
146
				break;
141
				break;
147
			case "part":
142
			case "part":
148
				xipRequestMessage += msg.message;			
143
				xipRequestMessage += msg.message;			
149
				setClientUrl("ok");
144
				setClientUrl("ok");
150
				break;
145
				break;
151
			case "end":
146
			case "end":
152
				setClientUrl("ok");
147
				setClientUrl("ok");
153
				xipRequestMessage += msg.message;
148
				xipRequestMessage += msg.message;
154
				sendXhr();
149
				sendXhr();
155
				break;
150
				break;
156
		}
151
		}
157
	}
152
	}
158
 
153
 
159
	function sendResponse(encodedData){
154
	function sendResponse(encodedData){
160
		//Break the message into parts, if necessary.
155
		//Break the message into parts, if necessary.
161
		xipResponseParts = [];
156
		xipResponseParts = [];
162
		var resData = encodedData;
157
		var resData = encodedData;
163
		var urlLength = xipClientUrl.length;
158
		var urlLength = xipClientUrl.length;
164
		var partLength = xipUrlLimit - urlLength;
159
		var partLength = xipUrlLimit - urlLength;
165
		var resIndex = 0;
160
		var resIndex = 0;
166
 
161
 
167
		while((resData.length - resIndex) + urlLength > xipUrlLimit){
162
		while((resData.length - resIndex) + urlLength > xipUrlLimit){
168
			var part = resData.substring(resIndex, resIndex + partLength);
163
			var part = resData.substring(resIndex, resIndex + partLength);
169
			//Safari will do some extra hex escaping unless we keep the original hex
164
			//Safari will do some extra hex escaping unless we keep the original hex
170
			//escaping complete.
165
			//escaping complete.
171
			var percentIndex = part.lastIndexOf("%");
166
			var percentIndex = part.lastIndexOf("%");
172
			if(percentIndex == part.length - 1 || percentIndex == part.length - 2){
167
			if(percentIndex == part.length - 1 || percentIndex == part.length - 2){
173
				part = part.substring(0, percentIndex);
168
				part = part.substring(0, percentIndex);
174
			}
169
			}
175
			xipResponseParts.push(part);
170
			xipResponseParts.push(part);
176
			resIndex += part.length;
171
			resIndex += part.length;
177
		}
172
		}
178
		xipResponseParts.push(resData.substring(resIndex, resData.length));
173
		xipResponseParts.push(resData.substring(resIndex, resData.length));
179
		
174
		
180
		xipPartIndex = 0;
175
		xipPartIndex = 0;
181
		sendResponsePart();
176
		sendResponsePart();
182
	}
177
	}
183
	
178
	
184
	function sendResponsePart(){
179
	function sendResponsePart(){
185
		if(xipPartIndex < xipResponseParts.length){
180
		if(xipPartIndex < xipResponseParts.length){
186
			//Get the message part.
181
			//Get the message part.
187
			var partData = xipResponseParts[xipPartIndex];
182
			var partData = xipResponseParts[xipPartIndex];
188
			
183
			
189
			//Get the command.
184
			//Get the command.
190
			var cmd = "part";
185
			var cmd = "part";
191
			if(xipPartIndex + 1 == xipResponseParts.length){
186
			if(xipPartIndex + 1 == xipResponseParts.length){
192
				cmd = "end";
187
				cmd = "end";
193
			}else if (xipPartIndex == 0){
188
			}else if (xipPartIndex == 0){
194
				cmd = "start";
189
				cmd = "start";
195
			}
190
			}
196
 
191
 
197
			setClientUrl(cmd, partData);
192
			setClientUrl(cmd, partData);
198
			xipPartIndex++;
193
			xipPartIndex++;
199
		}else{
194
		}else{
200
			xipServerInit();
195
			xipServerInit();
201
		}
196
		}
202
	}
197
	}
203
 
198
 
204
	function setClientUrl(cmd, message){
199
	function setClientUrl(cmd, message){
205
		var clientUrl = makeClientUrl(cmd, message);
200
		var clientUrl = makeClientUrl(cmd, message);
206
		//Safari won't let us replace across domains.
201
		//Safari won't let us replace across domains.
207
		if(navigator.userAgent.indexOf("Safari") == -1){
202
		if(navigator.userAgent.indexOf("Safari") == -1){
208
			parent.location.replace(clientUrl);
203
			parent.location.replace(clientUrl);
209
		}else{
204
		}else{
210
			parent.location = clientUrl;
205
			parent.location = clientUrl;
211
		}
206
		}
212
	}
207
	}
213
 
208
 
214
	function makeClientUrl(cmd, message){
209
	function makeClientUrl(cmd, message){
215
		var clientUrl = xipClientUrl + "#" + (xipIdCounter++) + ":" + cmd;
210
		var clientUrl = xipClientUrl + "#" + (xipIdCounter++) + ":" + cmd;
216
		if(message){
211
		if(message){
217
			clientUrl += ":" + message;
212
			clientUrl += ":" + message;
218
		}
213
		}
219
		return clientUrl
214
		return clientUrl
220
	}
215
	}
221
 
216
 
222
	function xhrDone(xhr){
217
	function xhrDone(xhr){
223
		/* Need to pull off and return the following data:
218
		/* Need to pull off and return the following data:
224
			- responseHeaders
219
			- responseHeaders
225
			- status
220
			- status
226
			- statusText
221
			- statusText
227
			- responseText
222
			- responseText
228
		*/
223
		*/
229
		var response = {};
224
		var response = {};
230
	
225
	
231
		if(typeof(xhr.getAllResponseHeaders) != "undefined"){
226
		if(typeof(xhr.getAllResponseHeaders) != "undefined"){
232
			var allHeaders = xhr.getAllResponseHeaders();
227
			var allHeaders = xhr.getAllResponseHeaders();
233
			if(allHeaders){
228
			if(allHeaders){
234
				response.responseHeaders = allHeaders;
229
				response.responseHeaders = allHeaders;
235
			}
230
			}
236
		}
231
		}
237
		
232
		
238
		if(xhr.status == 0 || xhr.status){
233
		if(xhr.status == 0 || xhr.status){
239
			response.status = xhr.status;
234
			response.status = xhr.status;
240
		}
235
		}
241
		
236
		
242
		if(xhr.statusText){
237
		if(xhr.statusText){
243
			response.statusText = xhr.statusText;
238
			response.statusText = xhr.statusText;
244
		}
239
		}
245
		
240
		
246
		if(xhr.responseText){
241
		if(xhr.responseText){
247
			response.responseText = xhr.responseText;
242
			response.responseText = xhr.responseText;
248
		}
243
		}
249
	
244
	
250
		//Build a string of the response object.
245
		//Build a string of the response object.
251
		var result = "";
246
		var result = "";
252
		var isFirst = true;
247
		var isFirst = true;
253
		for (var param in response){
248
		for (var param in response){
254
			if(isFirst){
249
			if(isFirst){
255
				isFirst = false;
250
				isFirst = false;
256
			}else{
251
			}else{
257
				result += "&";
252
				result += "&";
258
			}
253
			}
259
			result += param + "=" + encodeURIComponent(response[param]);
254
			result += param + "=" + encodeURIComponent(response[param]);
260
		}
255
		}
261
		sendResponse(result);
256
		sendResponse(result);
262
	}
257
	}
263
 
258
 
264
	function sendXhr(){
259
	function sendXhr(){
265
		var request = {};
260
		var request = {};
266
		var nvPairs = xipRequestMessage.split("&");
261
		var nvPairs = xipRequestMessage.split("&");
267
		var i = 0;
262
		var i = 0;
268
		var nameValue = null;
263
		var nameValue = null;
269
		for(i = 0; i < nvPairs.length; i++){
264
		for(i = 0; i < nvPairs.length; i++){
270
			if(nvPairs[i]){
265
			if(nvPairs[i]){
271
				var nameValue = nvPairs[i].split("=");
266
				var nameValue = nvPairs[i].split("=");
272
				request[decodeURIComponent(nameValue[0])] = decodeURIComponent(nameValue[1]);
267
				request[decodeURIComponent(nameValue[0])] = decodeURIComponent(nameValue[1]);
273
			}
268
			}
274
		}
269
		}
275
 
270
 
276
		//Split up the request headers, if any.
271
		//Split up the request headers, if any.
277
		var headers = {};
272
		var headers = {};
278
		if(request.requestHeaders){
273
		if(request.requestHeaders){
279
			nvPairs = request.requestHeaders.split("\r\n");
274
			nvPairs = request.requestHeaders.split("\r\n");
280
			for(i = 0; i < nvPairs.length; i++){
275
			for(i = 0; i < nvPairs.length; i++){
281
				if(nvPairs[i]){
276
				if(nvPairs[i]){
282
					nameValue = nvPairs[i].split(": ");
277
					nameValue = nvPairs[i].split(": ");
283
					headers[decodeURIComponent(nameValue[0])] = decodeURIComponent(nameValue[1]);
278
					headers[decodeURIComponent(nameValue[0])] = decodeURIComponent(nameValue[1]);
284
				}
279
				}
285
			}
280
			}
286
 
281
 
287
			request.requestHeaders = headers;
282
			request.requestHeaders = headers;
288
		}
283
		}
289
		
284
		
290
		if(isAllowedRequest(request)){
285
		if(isAllowedRequest(request)){
291
		
286
		
292
			//The request is allowed, so set up the XHR object.
287
			//The request is allowed, so set up the XHR object.
293
			var xhr = dojo.hostenv.getXmlhttpObject();
288
			var xhr = dojo.hostenv.getXmlhttpObject();
294
			
289
			
295
			//Start timer to look for readyState.
290
			//Start timer to look for readyState.
296
			var xhrIntervalId = setInterval(function(){
291
			var xhrIntervalId = setInterval(function(){
297
			
292
			
298
				if(xhr.readyState == 4){
293
				if(xhr.readyState == 4){
299
					clearInterval(xhrIntervalId);
294
					clearInterval(xhrIntervalId);
300
					xhrDone(xhr);
295
					xhrDone(xhr);
301
				}
296
				}
302
			}, 10);
297
			}, 10);
303
 
298
 
304
			//Actually start up the XHR request.
299
			//Actually start up the XHR request.
305
			xhr.open(request.method, request.uri, true);
300
			xhr.open(request.method, request.uri, true);
306
			dojo.setHeaders(xhr, request.requestHeaders);
301
			dojo.setHeaders(xhr, request.requestHeaders);
307
			
302
			
308
			var content = "";
303
			var content = "";
309
			if(request.data){
304
			if(request.data){
310
				content = request.data;
305
				content = request.data;
311
			}
306
			}
312
 
307
 
313
			try{
308
			try{
314
				xhr.send(content);
309
				xhr.send(content);
315
			}catch(e){
310
			}catch(e){
316
				if(typeof xhr.abort == "function"){
311
				if(typeof xhr.abort == "function"){
317
					xhr.abort();
312
					xhr.abort();
318
					xhrDone({status: 404, statusText: "xip_server.html error: " + e});
313
					xhrDone({status: 404, statusText: "xip_server.html error: " + e});
319
				}
314
				}
320
			}
315
			}
321
		}
316
		}
322
	}
317
	}
323
 
318
 
324
	function unpackMessage(encodedMessage){
319
	function unpackMessage(encodedMessage){
325
		var parts = encodedMessage.split(":");
320
		var parts = encodedMessage.split(":");
326
		var command = parts[1];
321
		var command = parts[1];
327
		encodedMessage = parts[2] || "";
322
		encodedMessage = parts[2] || "";
328
 
323
 
329
		var config = null;
324
		var config = null;
330
		if(command == "init"){
325
		if(command == "init"){
331
			var configParts = encodedMessage.split("&");
326
			var configParts = encodedMessage.split("&");
332
			config = {};
327
			config = {};
333
			for(var i = 0; i < configParts.length; i++){
328
			for(var i = 0; i < configParts.length; i++){
334
				var nameValue = configParts[i].split("=");
329
				var nameValue = configParts[i].split("=");
335
				config[decodeURIComponent(nameValue[0])] = decodeURIComponent(nameValue[1]);
330
				config[decodeURIComponent(nameValue[0])] = decodeURIComponent(nameValue[1]);
336
			}
331
			}
337
		}
332
		}
338
		return {command: command, message: encodedMessage, config: config};
333
		return {command: command, message: encodedMessage, config: config};
339
	}
334
	}
340
 
335
 
341
	function onServerLoad(){
336
	function onServerLoad(){
342
		xipServerInit();
337
		xipServerInit();
343
 
338
 
344
		//Decode the init params
339
		//Decode the init params
345
		var config = unpackMessage(window.location.href.split("#")[1]).config;
340
		var config = unpackMessage(window.location.href.split("#")[1]).config;
346
 
341
 
347
		xipStateId = config.id;
342
		xipStateId = config.id;
348
		xipClientUrl = config.client;
343
		xipClientUrl = config.client;
-
 
344
		
-
 
345
		//Make sure we don't have a javascript: url, just for good measure.
-
 
346
		if(xipClientUrl.split(":")[0].match(/javascript/i)){
-
 
347
			throw "Invalid client URL";
-
 
348
		}
-
 
349
		if(!xipStateId.match(/^XhrIframeProxy[0-9]+$/)){
-
 
350
			throw "Invalid state ID";
-
 
351
		}
-
 
352
 
349
		xipUseFrameRecursion = config["fr"];
353
		xipUseFrameRecursion = config["fr"];
350
 
354
 
351
		setInterval(pollHash, 10);
355
		setInterval(pollHash, 10);
352
		
356
		
353
		if(xipUseFrameRecursion == "true"){
357
		if(xipUseFrameRecursion == "true"){
354
			var serverUrl = window.location.href.split("#")[0];
358
			var serverUrl = window.location.href.split("#")[0];
355
			document.getElementById("iframeHolder").innerHTML = '<iframe src="'
359
			document.getElementById("iframeHolder").innerHTML = '<iframe name="'
-
 
360
				+ xipStateId + '_clientEndPoint'
-
 
361
				+ '" src="javascript:false">'
-
 
362
				+ '</iframe>';
-
 
363
			var iframeNode = document.getElementsByTagName("iframe")[0];
356
				+ makeClientUrl("init", 'id=' + xipStateId + '&server=' + encodeURIComponent(serverUrl)
364
			iframeNode.src = makeClientUrl("init", 'id=' + xipStateId + '&server='
357
				+ '&fr=endpoint') + '" name="' + xipStateId + '_clientEndPoint"></iframe>';
365
				+ encodeURIComponent(serverUrl) + '&fr=endpoint');
358
		}else{
366
		}else{
359
			setClientUrl("loaded");
367
			setClientUrl("loaded");
360
		}
368
		}
361
	}
369
	}
362
 
370
 
363
	if(typeof(window.addEventListener) == "undefined"){
371
	if(typeof(window.addEventListener) == "undefined"){
364
		window.attachEvent("onload", onServerLoad);
372
		window.attachEvent("onload", onServerLoad);
365
	}else{
373
	}else{
366
		window.addEventListener('load', onServerLoad, false);
374
		window.addEventListener('load', onServerLoad, false);
367
	}
375
	}
368
	// -->
376
	// -->
369
	</script>
377
	</script>
370
</head>
378
</head>
371
<body>
379
<body>
372
	<h4>The Dojo Toolkit -- xip_server.html</h4>
380
	<h4>The Dojo Toolkit -- xip_server.html</h4>
373
 
381
 
374
	<p>This file is used for Dojo's XMLHttpRequest Iframe Proxy. This is the the file
382
	<p>This file is used for Dojo's XMLHttpRequest Iframe Proxy. This is the the file
375
	that should go on the server that will actually be doing the XHR request.</p>
383
	that should go on the server that will actually be doing the XHR request.</p>
376
	<div id="iframeHolder"></div>
384
	<div id="iframeHolder"></div>
377
</body>
385
</body>
378
</html>
386
</html>