Hi all...
I need to load an image, access it's content and render it.
So, tried:
<script type="text/javascript">
xmlHttp = new XMLHttpRequest( );
xmlHttp.open("G ET", "http://127.0.0.1/image.jpg", false);
xmlHttp.send(nu ll);
imgbin = xmlHttp.respons eText;
alert(imgbin.ch arAt(10)); //just for testing the access
//returns an empty box
</script>
<img src="javascript :imgbin">
Since the javascript code works for html files, i think the problem is
the binary content.
The <img src...> failed too.
Any Hints???
I need to load an image, access it's content and render it.
So, tried:
<script type="text/javascript">
xmlHttp = new XMLHttpRequest( );
xmlHttp.open("G ET", "http://127.0.0.1/image.jpg", false);
xmlHttp.send(nu ll);
imgbin = xmlHttp.respons eText;
alert(imgbin.ch arAt(10)); //just for testing the access
//returns an empty box
</script>
<img src="javascript :imgbin">
Since the javascript code works for html files, i think the problem is
the binary content.
The <img src...> failed too.
Any Hints???
Comment