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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:51:10+00:00 2026-06-11T12:51:10+00:00

SO basically im trying to create a button on a html webpage that uses

  • 0

SO basically im trying to create a button on a html webpage that uses or checks the values from two drop down lists and relative to that it will link to the appropriate page.
But the IF statements dont seem to work…

i tried using regular href Links but this didnt end well, such as When to use onclick in HTML?

here is my code:

<select name="Module">
<option value="Module 10">Module 10</option>
<option value="Module 11">Module 11</option>
<option value="Module 20">Module 20</option>
<option value="Module 60">Module 60</option>
<option value="Module 70">Module 70</option>
<option value="Module 85">Module 85</option>
</select>


<select name="Sector">
<option value="Sector1">Sector1</option>
<option value="Sector2">Sector2</option>
<option value="Sector3">Sector3</option>
<option value="Sector4">Sector4</option>
</select>


<FORM> 
<INPUT type="button" value="OK" 
onClick="if (( Module=='Module 10') && (Sector=='Sector1)) {location.href='M10_S1.html'}"> 
</FORM> 
  • 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-11T12:51:11+00:00Added an answer on June 11, 2026 at 12:51 pm

    This should be what you want:

    <form>
    <select name="Module">
    <option value="1">Module 1</option>
    <option value="2">Module 2</option>
    <option value="3">Module 3</option>
    <option value="4">Module 4</option>
    <option value="5">Module 5</option>
    <option value="6">Module 6</option>
    </select>
    
    
    <select name="Sector">
    <option value="1">Sector1</option>
    <option value="2">Sector2</option>
    <option value="3">Sector3</option>
    <option value="4">Sector4</option>
    </select>
    
    <input type="button" value="Confirm" onClick="location.href='./M' + Module.value + '_S' + Sector.value + '.htm'"> 
    </form> 
    

    The file names will be formatted as “M#_S#.htm”

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

Sidebar

Related Questions

I am trying to create something in Perl that is basically like the Unix
I'm trying to create a function that searches up a WebControl's parent-child relationship (basically
I'm trying to create a widget (which is basically an iframe) that would have
I'm basically trying to create a url friendly query string with user input. The
I'm basically trying to create a 2 column div with a liquid <h1> and
im stuck with a problem im basically trying to create a function where I
Basically I'm trying to create a BASIC sorting program in ruby without using .sort
Basically I'm trying to create an implementation of simulated annealing for the multidimensional knapsack
I am trying to create a rule for snort to basically log any packets
I'm trying to create a .vcs file in C#. Basically in outlook if you

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.