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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:41:50+00:00 2026-06-02T08:41:50+00:00

I am working on my school application using jsp and web-development is new to

  • 0

enter image description hereI am working on my school application using jsp and web-development is new to me.
At this moment I am stumbled upon the issue:

The process should be this:

I have a Dropdown box with multiple values.
For example:

Room: 111 | Building: ACC | Capacity: 15

Room: 111 | Building: ACD | Capacity: 25

Room: 151 | Building: ACC | Capacity: 11

Room: 113 | Building: ACC | Capacity: 15

When user selects ANY option nothing should happen.

Next to the dropdown box, I have a <a href link..> which sais “see the chart”.

When user presses “see the chart” the following process should take place:

  1. String in selected box should be separated and Room# and Bulding# must be extracted into separate strings
  2. new windowshould open with this link:
    room_chart.jsp?room=111&building=ACC (for example)

I know how to split the string and do it in general, but I don’t know how to dynamically do it without reloading the page… I guess I would need to implement the JavaScript?

  • 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-02T08:41:53+00:00Added an answer on June 2, 2026 at 8:41 am

    Call a Javascript function in the anchor’s href attribute. In that function use document.getElementById with the select box’s id to get the selected string, split it, and send an ajax request or open a new window with window.open (but that’s not dynamic).

    <html>
        <script type="text/javascript">
            function view_chart() {
                var select = document.getElementById("room_select");
                var option = select.options.item(select.selectedIndex).value;
                var tokens = option.split(/[:|]/);
                var url = "room_chart.jsp?room="+trim(tokens[1])+"&building="+trim(tokens[3]);
                window.open(url);
            }
    
            function trim(value) {
                value = value.replace(/^\s+/,'');
                value = value.replace(/\s+$/,'');
                return value;
            }
        </script>
        <body>
            <select id="room_select">
              <option>Room: 014 | Building: ACT</option>
              <option>Room: 005 | Building: ACC</option>
            </select>
            <a href="javascript:view_chart()">Show Info</a>
        </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am building a high school team application using Django. Here is my working
I'm working on a school project desktop application in c# using Visual Studio 2010
Still working on a web application as a school project, and it just seems
while working on a school project i ran into a problem using javascript to
Im working on a school project and it's my first time on android development.
I'm working on a school assignment and I've been completely stumped with this step.
For my school project, I am working on a database management application. It is
I'm developing a Grails application to a school work. Typically, this is the URL
I'm working on my C# client server application for school, and I have a
I have a Java web application I’m developing for a school project. There’s 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.