get image using XMLHttp and display on WWW??

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sergiusz Michalski

    #1

    get image using XMLHttp and display on WWW??

    Hallo!

    Is it possible to get image using XMLHTTP and display it on WWW ??

    All secury lack solutions are needless so ADODB.Stream won't be a right way!

    Thanks for help!

    SM.


  • Martin Honnen

    #2
    Re: get image using XMLHttp and display on WWW??



    Sergiusz Michalski wrote:

    [color=blue]
    > Is it possible to get image using XMLHTTP and display it on WWW ??[/color]

    You have
    var img = document.create Element('img');
    img.onload = function (evt) {
    document.body.a ppendChild(this );
    };
    img.src = 'whatever.gif';
    if you want to load and display an image in a HTML page.

    XMLHTTP is not suitable for bitmap image data unless the binary data is
    encoded in the XML in base64 for instance, you would then need to decode
    the data on the client.
    There are some exceptions, for instance black and white XBM images would
    do but not all browsers support that format and support the necessary
    <img src="javascript : scriptExpressio nReturningImage DataHere">

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/

    Comment

    Working...