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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:07:08+00:00 2026-06-05T13:07:08+00:00

let’s say I have a select list as follows: <select name=’languages’> <option value=’german’>German</option> <option

  • 0

let’s say I have a select list as follows:

<select name='languages'>
    <option value='german'>German</option>
    <option value='english'>English</option>
</select>

How do I, with javascript/jQuery refresh the page when the user selects a language and add a Named parameter style parameters to the end of my url every time the user smakes a choice, for example, if the user selects german, the url should look like:

http://my_app/my_controller/my_action/language:select_option_value_for_german

If the user selects english, the url will be:

http://my_app/my_controller/my_action/language:select_option_value_for_english

So, everytime the user makes a selection, the same page is refreshed with the named parameters added at the end of the url.

NOTE : I want the named parameters to appear only once per request, in other words, I don’t want them to repeat at the end of the url like:

http://my_app/my_controller/my_action/language:select_option_value_for_german/language:select_option_value_for_english

Any help is very appreciated

Thank you

  • 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-05T13:07:10+00:00Added an answer on June 5, 2026 at 1:07 pm

    In your js file listen to change event on your select and build the url and navigate to the built url.

    $('select[name="languages"]').change(function(){
        var url ="/my_app/my_controller/my_action/language:" + $(this).val();
        window.location = url;
    });​​​
    

    Change your selectbox with default value, for you to select the German in every refresh. I miss to notice that every refresh the default is german that is why you always get english

    <select name='languages'>
        <option>Select language</option>
        <option value='german'>German</option>
        <option value='english'>English</option>
    </select>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say you have a method that expects a numerical value as an argument.
Let's say I have window.open (without name parameter), scattered in my project and I
Let's say that I have a date in R and it's formatted as follows.
Let's say I have a javascript array with a bunch of elements (anywhere from
Let's say we have a simple function defined in a pseudo language. List<Numbers> SortNumbers(List<Numbers>
Let's say I have an string variable called *magic_string* which value is set to
Let's say I have a sortable list like this: $(.song-list).sortable({ handle : '.pos_handle', axis
Let's say I have the following classes : public class MyProductCode { private String
Let's say I have a due date and a reminder timespan . How do
Let's say I have a bunch of links that share a click event: <a

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.