Hi,
Sometimes, via AJAX, I'm getting binary content from a server (application/octet-stream), other times html-text. When server response with binary content (PDF, EXCEL, etc) I'like to send to user. It's possible???? This is my code: function CNMSubmitAjax(arguments,id_capa, extra_props) { var ret; var _msg=""; $.ajax ( { type: "POST", url: CNMCONTROLLER, cache: false, async: ASYNC, data: arguments, beforeSend: CNMWaitWindowStart(), error: function (o,msg,eoerror) { CNMShowAjaxError(o,msg,eoerror); }, success: function (msg) { _msg=msg; CNMWaitWindowStop(); }, complete:function (xml_http_request) { //Is it binary Type????? var content_type = xml_http_request.getResponseHeader('Content-Type'); if (content_type == "application/octet-stream" ) { document.write(result); <---------------------- Don't work !!!!! It's possible? } else { ......... } } } ); } Thanks in advance.... -- View this message in context: http://www.nabble.com/Write-binary-data-%28from-server%29-is-possible-with-Ajax--tp18131651s27240p18131651.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.