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

  • Home
  • SEARCH
  • 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 3623336
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T23:22:14+00:00 2026-05-18T23:22:14+00:00

I am having a web form initially which have href as follows <a href=downloadInfo.aspx>ACH

  • 0

I am having a web form initially which have href as follows

   <a href="downloadInfo.aspx">ACH File Management System Trail(msi)</a>
   <a href="downloadInfo.aspx">ACH File Management System Trail(zip)</a>

These are my two anchor tags when i click on this i will redirect both to a same page where user has to fill details and a mail will be send to the user for the given mail id. When the user clicks on mail i would like to have the download for which he opted to download. If msi means i would like to prompt msi file to be downloaded and if zip it should be downloaded

I need this to be worked with out using query-string

  • 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-18T23:22:15+00:00Added an answer on May 18, 2026 at 11:22 pm

    You’ll need JavaScript. First, on the choose page, add an id attribute to each <a> whose value would tell you what file to download. Then use JavaScript (jQuery does this easily) to hijack the anchor tags:

    preventDefault() on an <a> tag

    The hijack is an onclick event on each anchor tag that tells the client to not following the href. Instead it reads the anchor’s id and href values and either:

    1. sets the id as a cookie and then sets the window.location to the anchror’s href OR
    2. posts the id value as a form field to the anchor’s href

    The receiving page reads the cookie or form field, respectively, to determine what file to serve for download.

    Update

    <!DOCTYPE html>
    <html>
    <head>
      <script src="http://code.jquery.com/jquery-1.4.4.js"></script>
    </head>
    <body>
        <a id="ach-msi" href="downloadInfo.aspx">ACH File Management System Trail(msi)</a><br/>
        <a id="ach-zip" href="downloadInfo.aspx">ACH File Management System Trail(zip)</a>
        <script>
        $("a").click(function(event) {
            event.preventDefault();
            var id = $(this).attr('id');
            var href = $(this).attr('href');
            /* this uses the cookie option */
            document.cookie = 'download-file=' + id;
            window.location = href;
        });
        </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 the following web config file. I am having some difficulty in retrieving
Scenarion: I am having a web application which is going to use SqlServerReport(SSRS) sitting
I have being having trouble with the web server used for our intranet. It
I have a huge web app that is having issues with memory leak in
I have a web report that uses a Django form (new forms) for fields
I am having 2 web formsand will have a drop down list on those
I am having a frequent problems with my web hosting (its shared) I am
The problem I'm having with writing a web application architecture is that I want
I'm having an issue with CruiseControl.net where the web dashboard just won't work in
I'm having major rendering issues in Safari with the web application I'm working on.

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.