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 1062831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T18:41:22+00:00 2026-05-16T18:41:22+00:00

I am using $ajax( { type:post, url:/whatever/ } ) to access my server which

  • 0

I am using $ajax( { type:"post", url:"/whatever/" } ) to access my server which works nicely. The problem is that the response is not evaluated as I need it.
On some occations the server sends back a dummy string (“x”) which can be ignored on the browser, but on other occasions my server sends back a special file as attachment:

mimetype application/x-my-special-type
Content-Disposition attachment; filename=myname.ext
....

But the browser (I am only interested in Google Chrome / Chromium – it’s an intranet thing) does not show the download popup window. (Calling the “/whatever/” URL directly in the address bar actually DOES show the download popup window to save the file.)

How can I persuade jQuery to show the usual download popup window?

  • 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-16T18:41:23+00:00Added an answer on May 16, 2026 at 6:41 pm

    Send the user to the URL by setting window.location.href or linking directly to the file. Do not use AJAX for this, as it is only used for retrieving data to variables/inserting to DOM. You’ll probably need to think of a different way to represent the no-response case. Perhaps the AJAX portion could be used to establish if a file is available or not, and the redirection would occur if the AJAX response indicates that a file is available.

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

Sidebar

Related Questions

when i send ajax request i got the error that $.ajax({ type: POST, url:
I have grabbed some XML data using this piece of jQuery: $.ajax({ type: POST,
Doing an ajax get request works as expected using the following code: $.ajax({ type:
In my document I have this script: $.ajax({ type:POST,url:ajax.php,data:data, success: function() { //onsuccess },
I have datestring =name=one $.ajax({ type: POST, url: 'url.com', data:datastring, complete: function(data){ alert(data); }
This is a general question about using Ajax on data that is not text/string.
I have an ajax call like $.ajax({ type: 'POST', url: 'addVideo', data: { video_title:
I am using ASP.NET page methods with jQuery. Here is my code, $.ajax({ type:
In my MVC3 app, I'm using $.ajax to call a method of type JsonResult
I am using Ajax to post the comments of the website. No the user

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.