> The browser will then issue a seperate request to fetch that image.
It is a separate request. But it is on the same thread. In my application,
first the browser submits the request for form processing when that
completes, it is downloading the image.
And an image is not "text", so that may be why "responseText" gives
So how can I extract the binary data out of HTTPRequest. Sorry but I am not
very well versed with JavaScript programming.
regards,
Abhishek.
"Hans Kesting" <ne***********@spamgourmet.com> wrote in message
news:mn***********************@spamgourmet.com... Hello All,
I am trying to obtain an image asynchronously for this I have written
code which uses XMLHTTP object to retreive the image.
now I have to display this image in an iframe. when I say
iframe.contentWindow.document.write(xmlHttp.respon seText);
I get an text as "JFIF" in my frame.
Why am I not able to see the image ?
I cannot do something like <img src="img.aspx" /> because I want to fetch
the image asynchronously. using the img tag would mean that I fetch the
image in the same thread as the main page.
regards,
Abhishek.
Are you sure? IIRC first the browser needs to decode the html to find the
<img> tag. The browser will then issue a seperate request to fetch that
image.
And an image is not "text", so that may be why "responseText" gives wrong
results.
Hans Kesting