[Javascript] Forward image via http with ajax
Terry Riegel
riegel at clearimageonline.com
Thu Feb 1 21:20:42 CST 2007
On Feb 1, 2007, at 9:59 PM, Paul Novitski wrote:
> At 2/1/2007 06:01 PM, Terry Riegel wrote:
>> Ahhh discovering the possible is much easier than the impossible :)
>
> Yes, it's impossible to prove something's impossible... Although
> then it must follow that it's impossible to prove that it's
> impossible to prove that something's impossible, eh what?
>
>
>> This is not what is happening though. The image is something like...
>> http://192.168.1.26/image.cgi
>> So it is being loaded off of the local network (not the internet)
>>
>>
>>> On the other hand, if the image constitutes the value of a DOM
>>> element, perhaps all you need to do is htmlencode the binary string
>>> and feed it to an HttpXMLRequest routine.
> ...
>> And it is successfully loading into the web browser (i.e. I see it).
>> I don't know if that means it is a DOM element. If it is how do I
>> encode it and send it? Even rough untested code would be helpful.
>
>
> Hmm. Using PHP I can feed a binary string to a browser to make an
> image appear in the client but I don't know how to do the opposite,
> read the binary string value of an image already displayed. The
> bit of research I just did (Google, Firefox web developer toolbar,
> Gecko DOM Reference) was fruitless. I wonder if you need a COM/
> Active-X module client-side to do this?
>
> Again, what's the mechanism that's feeding the image to the
> browser? Are you setting the browser's address bar to the intranet
> address of the camera? Can you intervene before the information
> reaches the browser?
The Page would look like this
<html>
<img src="http://192.168.1.122/axis-cgi/jpg/image.cgi?
resolution=320x240">
</html>
But since you persisted I wonder if I could use xmlHttpRequest to
request the image, then just send it along to the server. Something like
xmlhttprequest to http://axis797e5b.axiscam.net/axis-cgi/jpg/
image.cgi?resolution=320x240 knowing it will delivery binary data back
then take the response and using xmlhttprequest again send it to
my.example.com
Would this work?
Terry
>
> Curiously,
> Paul
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20070201/934df03c/attachment.htm>
More information about the Javascript
mailing list