HOme Sheriff And Lamp

Dependencies:   CameraC328 HCSR04 SDFileSystem WIZnetInterface mbed

Fork of HoSAL by pi bae

html/image.html

Committer:
uasonice
Date:
2015-08-13
Revision:
13:cefc034543a5

File content as of revision 13:cefc034543a5:

<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>image</title>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
<meta http-equiv='pragma' content='no-cache' />
<meta http-equiv='content-type' content='no-cache, must-revalidate' />
<style>
body{background-color:transparent;}
</style>

<script>
function AJAX(url, callback)
{
	var req = AJAX_init();
	req.onreadystatechange = AJAX_processRequest;

	function AJAX_init() {
		if (window.XMLHttpRequest) {
			return new XMLHttpRequest();
		} else if (window.ActiveXObject) {
			return new ActiveXObject('Microsoft.XMLHTTP');
		}
	};

	function AJAX_processRequest() {
		if(req.readyState == 4) {
			if(req.status == 200) {
			if(callback)
				callback(req.responseText);
			}
		}
	};

	this.doGet = function() {
		req.open('GET', url, true);
		req.send(null);
	};

	this.doPost = function(body) {
		req.open('POST', url, true);
		req.setRequestHeader('Content-Type',
		'application/x-www-form-urlencoded');
		req.setRequestHeader('ISAJAX','yes');
		req.send(body);
	};
};

function $(id){return document.getElementById(id);}
function $$(id){return document.getElementsByName(id);}
function $$_ie(tag, name){
	if(!tag){tag='*';}
	var elems=document.getElementsByTagName(tag);
	var res=[];
	for(var i=0;i<elems.length;i++){
		att=elems[i].getAttribute('name');
		if(att==name){
			res.push(elems[i]);
		}
	}
	return res;
}

</script>

<script>
function load() {
	strFile= window.location.search.substring(1);
	$('imgFile').src = strFile;
}
</script>


</head>
<body onload="load()">
	<img id='imgFile'>

</body>
</html>