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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:47:07+00:00 2026-06-15T19:47:07+00:00

I have three select boxes: <select id=one> <option value=default>Select Product</option> <option value=value-a1>string1</option> <option value=value-a2>string2</option>

  • 0

I have three select boxes:

<select id="one">
    <option value="default">Select Product</option>
    <option value="value-a1">string1</option>
    <option value="value-a2">string2</option>
    <option value="value-a3">string3</option>
</select>

<select id="two">
    <option value="default">Select Version</option>
    <option value="value-b4">string4</option>
    <option value="value-b5">string5</option>
    <option value="value-b6">string6</option>
</select>

<select id="three">
    <option value="default">Select Architecture</option>
    <option value="value-c6">string7</option>
    <option value="value-c7">string8</option>
    <option value="value-c8">string9</option>
</select>

Based on what the user selects for these three boxes, I want to download a file like so, for example:

mysite.com/download/value-a1_value-b2_value-c3

Basically, the file is an installer, that can be a certain product, a specific version, and the architecture (using EXE as an example; will have DMG and ZIP too):

mysite.com/download/product-a_version-b_arch-64.exe

I understand that my approach may not be the best, so I’m open to suggestions, but if I could get this approach to work, that would be great.

For the JavaScript I was thinking something like this:

function download_file(version_id, os_id, arch_id) {

    if (product_id == 'default' && version_id == 'default' && 
        arch_id == 'default') {
        return;
    }

    else if (product_id != 'default') {
        window.location = 'mysite.com/download/Install_' +
            product_id + '_' + version_id + '_' + arch_id + '.exe';
    }
}

I guess my main problem is how to select what select values are chosen in the three select boxes. I’m trying to glue together the results from the three select boxes and determine a path from that.

NOTE

I actually had more select boxes than I actually wrote about, but the principles are the same. Using answers below, I was able to get the file to be correct. Thanks for all the help!

  • 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-15T19:47:08+00:00Added an answer on June 15, 2026 at 7:47 pm

    jsFiddle Demo

    ​$(function() {
        var downloadButton = $( selector-for-your-button );
    
        $(downloadButton).click(function() {
    
            download_file( $('#one').val(), $('#two').val(),
                          $('#three').val());
    
        });
    });
    
    function download_file(product_id, version_id, arch_id) {
    
        // if any of them is default, cancel (use or ||)
        if (product_id == 'default' || version_id == 'default' || 
            arch_id == 'default') {
                alert("choose stuff!");
            return;
        }
    
        else if (product_id != 'default') {
            //window.location = 'mysite.com/download/Install_' +
            //    product_id + '_' + version_id + '_' + arch_id + '.exe';
            console.log(product_id + '_' + version_id + '_' + arch_id + '.exe');
        }
    }
    ​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two select boxes like so: <select id=one> <option value=default>Select File</option> <option value=path/to/file1>File
I have a select element. <select class='cSelectType'> <option value=1>one</option> <option value=2>two</option> <option value=3>three</option> <option
I have the following HTML markup:- <select name=List1 id=l1> <option>One</option> <option>Two</option> <option>Three</option> <option>Four</option> <option>Five</option>
I have a table with three columns, and two cells contain select boxes with
I currently have a HTML select box like below. <select name=item_1> <option value=0>Choose one...</option>
I have three select boxes, one to select the year, another one for the
I have three select boxes state,city and locality with the id's same as name
I have three select boxes :- select1 select2 select3 , i am fetching data
I have two combo boxes, one for 'order by' and the other 'direction' (ascending,
I have three select boxes on a page and I want to keep the

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.