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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:28:38+00:00 2026-06-10T19:28:38+00:00

I have a salesforce form embedded here . What this form does is to

  • 0

I have a salesforce form embedded here. What this form does is to take the user input data from my site to salesforce.com and after saving the data there it comes back to my site through a return url passed into the form.

Now, the page where it should return has a file download function. The file downloads alright but the url in the browser is where the form is submitted. I want the browser to navigate to my site after the form has been submitted and download the file while showing a message at the same time. Currently only file downloads and that too from a blank page.

Now the headers i’m passing from the download/thankyou page are :

        header('Content-Type: "'.$mime.'"');
        header('Content-Disposition: attachment; filename="'.$filename.'"');
        header("Content-Transfer-Encoding: binary");
        header('Expires: 0');
        header('Pragma: no-cache');
        header("Content-Length: ".strlen($data));

And i flush the buffer after the that :

    ob_clean(); flush(); 
    exit($data);

Please have a go at the form if you want and comment if the info is not sufficient. The site is still in debug mode. Also, guide me as to what i should do to achieve what i want.

  • 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-06-10T19:28:39+00:00Added an answer on June 10, 2026 at 7:28 pm

    The final URL that the browser lands on will either be a document with a MIME type that the browser can understand (e.g. text/html) or it won’t. If it is, the browser will display it and display the corresponding URL in the address bar. If it isn’t (e.g. application/exe) it will download it and leave the URL as it was.

    If you want to display a message while you’re downloading, you’ll have to serve back an HTML page (with MIME type text/html) that says “Your download will start shortly” and then kick off the download with JavaScript, something like:

    <!DOCTYPE html>
    
    <html>
      <head>
        <title>Downloading your file</title>
      </head>
    
      <body>
        <h1>Downloading your file</h1>
        <p>Your download will begin shortly</p>
    
        <script>
            window.setTimeout(
                function() {
                    window.location.href = "/mydownload.exe";
                },
                3000 // start download after 3 seconds
            );
        </script>
      </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a PHP script which fetches data from Salesforce via the Salesforce API
I have a page with a form that posts to salesforce.com's webto Lead service.
I'm testing Salesforce's WebToLead form using this simple example http://wiki.developerforce.com/index.php/Simple_Web2Lead_Implementation . When I changed
I have a salesforce I export to CSV using a URL like this https://tapp0.salesforce.com/00OT00000014APi?export=1&enc=UTF-8&xf=csv
I have been supplied a form by Salesforce.com for which I need to do
So, I have this new project. My company uses the SalesForce.com cloud to store
I have a question about fiscal date literals in the Force.com API ( http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_soql_select_dateformats.htm
I have been using SOAP to deal with Salesforce.com and have been using the
I have created an opportunity page layout in SalesForce.com and it is working fine.
I have a form that I have been submitting to Salesforce with standard form

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.