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

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -