Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7022041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:31:43+00:00 2026-05-27T23:31:43+00:00

I am using jQuery to send JSON back to the server and it sends

  • 0

I am using jQuery to send JSON back to the server and it sends back a pdf report, however it is not downloading the pdf the response header and javascript are below.

$('#log-report').live("click", function () {
var query = {

    'projectID': $('#ProjectID').val(),
    'lessontypeID': $('#lessonTypeID').val(),
    'phaseID': $('#phaseID').val(),
    'assetTypeID': $('#assetTypeID').val(),
    'dateFrom': $('#dateFrom').val(),
    'dateTo': $('#dateTo').val()
};

$.ajax({
    url: '/Report/getQueryPdf',
    data: query,
    type: 'GET',
    contentType: 'application/json, charset=utf-8'

});
});

Cache-Control:private
Connection:Close
Content-Disposition:attachment; filename=Lessons_Learned_Report.pdf
Content-Length:77211
Content-Type:application/pdf
Date:Tue, 03 Jan 2012 19:47:44 GMT
Server:ASP.NET Development Server/10.0.0.0
X-AspNet-Version:4.0.30319
X-AspNetMvc-Version:3.0
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T23:31:44+00:00Added an answer on May 27, 2026 at 11:31 pm

    The browser usually handles the MIME type when a page is requested. Because you’re using AJAX you’re allowing the AJAX request to handle the response. The browser ignores it.

    You need to pass the pdf URL to the browser using document.location= in order to allow the browser to “naturally” handle the request.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am able to send data to the server using JSON and get back
My back end is my Rails server which sends JSON data to my front
what im trying to do is to send data in JSON using jquery to
The Good: We send a JSON array of nested objects using JQuery and .ajax().
In a POST to an MVC controller, I'm using JQuery to send a JSON
How can i send a JSON object to a webmethod using jQuery?
Can I send email using jQuery only? I don't have .Net or PHP etc
I send asynchronous call using jQuery form plugin and in the case of success
I'm using JQuery and a WebMethod to send and store the string representation of
we would like to send a JSON update command to twitter, but only using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.