struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manos Batsis <manos_li...@geekologue.com>
Subject Re: Refreshing image with AJAX request
Date Thu, 25 Sep 2008 16:07:21 GMT
Frank W. Zammetti wrote:
> Ajax by its nature deals with textual information only, be it HTML, XML,
> JavaScript or plain text. 

Exactly, thus an XMLHttpRequest can be used update an image in two ways:

* The image URL can be passed as information to the HTTP response, 
wrapped in XML or not (i.e. XMLHttpRequest.responseText). That can be 
used to update an image.

* The actual image data can be encoded in base64 and sent in an XML 
envelope obtained by an XMLHttpRequest. The base64 string can then be 
used with the data: URI scheme[1] to render the image.

[1] http://en.wikipedia.org/wiki/Data:_URI_scheme

Cheers,

Manos

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message