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

The Archive Base Latest Questions

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

I have a dropdown menu. When I click on Italian in the dropdown, I

  • 0

I have a dropdown menu. When I click on “Italian” in the dropdown, I want the content for Italian to show. Basically, what I want is to set the action to IT when I select Italian from the dropdown. How might I apprach this?

 <% action = Request.QueryString("action") %>

    <form name="contentchanger" action="/" method="post">
         <select name="flag" name="flag">
              <option value="Choose" selected="selected">Choose</option>
              <option value="italian" onclick="what code i should use here?">Italian</option>
         </select>
    </form>
    <a href="?action=FR">FR</a>
    <a href="?action=IT">IT</a>

    <%
    if action = "IT" Then  
      Response.Write("<p>This is italian</p>") 
    else if  action = "FR" Then  
      Response.Write("<p>This is French</p>") 
    end if
    end if
    %>
  • 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:55:00+00:00Added an answer on May 16, 2026 at 6:55 pm

    It is better to use onchange event on the select box. Onclick doesn’t work well in all browsers. Bind a javascript function to the onchange event that changes the url of the a element (or redirect to the correct url if you want to change it instantly).

    Something like this should work. I recomment using a javascript libary like jquery if you want to do more interactive client side functionality

    changeLanguage()

    <select onchange="changeLanguage(this.value)">
        <option value="Choose" selected="selected">Choose</option>
        <option value="IT" >Italian</option>
        <option value="FR" >France</option>
    </select>
    
    <a id="url" href="?action=IT">IT</a>
    

    Javascript:

    function changeLanguage(language) {
        var element = document.getElementById("url");
        element.value = language;
        element.innerHTML = language;
    }
    

    Update:

    Code I used for my test. This works in the most recent versions of chrome, firefox and ie.

    <html>
    <head>
     <script>
      function changeLanguage(language) {
       var element = document.getElementById("url");
       element.value = language;
       element.innerHTML = language;
      }
     </script>
    </head>
    <body>
    <select onchange="changeLanguage(this.value)">
        <option value="Choose" selected="selected">Choose</option>
        <option value="IT" >Italian</option>
        <option value="FR" >France</option>
    </select>
    
    <a id="url" href="?action=IT">IT</a>
    </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 little dropdown menu similar <select> , which contolled from external js-function.
I have a simple html option/select (dropdown) menu. I want to use JQuery to
I have a dropdown menu inside a DIV. I want the dropdown to be
I have a dropdown menu. Its height is animated with jQuery from 5px to
I've got a simple dropdown menu that I want to hide whenever you click
I have a dropdown, I have a datasource, I have AutoPostBack set to true
Is there any way to have a dropdown in excel that will show a
I have a dropdown menu that is populated with key value pairs in php.
I have a dropdown menu that works via #id ul li ul { display:
I have 2 questions concerning C#. 1) I have a dropdown menu with several

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.