Open/Save PDF using jQuery $.Get -
currently submitting form automatically open/save pdf executing following code
httpservletresponse response = request.getservletresponse(true); response.setcontenttype("application/pdf"); // code 1 response.setheader("content-disposition", " attachment; filename=\"name.pdf\""); document document1 = new document();
when use jquery $.get/$.post execute above code, not pop-up option open/save pdf, instead looks pdf in firebug under response tab.
%pdf-1.4 %���� 3 0 obj <</filter/flatedecode/length 908>>stream x��v�r�h}�+�*/ު5��7��dw�z��8ai bi��w` �;�ri�s���鞆o�u�p ��<:�p�*���oo(pɓs�Ɋ,=f�=�vi���_�%��j....
is possible jquery?
don't use jquery's $.get. do
location.href = "theurl"
Comments
Post a Comment