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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:28:46+00:00 2026-06-07T16:28:46+00:00

I want to show textbox and select box combining value in a single text(1st

  • 0

I want to show textbox and select box combining value in a single text(1st tb value,then sb value).
This is the jsp page:

<table>
<tr>
<td>A : </td>
<td><input type="text" id="text1" name="customer" value=""></td>
</tr>
<tr><td>B :</td></tr>
<tr>
<td><input type="radio" onclick="change(this, 'select1000')" name="license[1]" value="1000"> 25-1000</td>
<td><div id="select1000" style="display: none">
<select id="select" name="selectbox">    
<option test="l25" value="25">25</option>
<option test="l100" value="100">100</option>
<option test="l175" value="175">175</option>
<option test="l250" value="250">250</option>
<option test="l325" value="325">325</option>
</select>
</div>
</td>
</tr>
<tr><td> ShowValue: </td>
<td><input type="text" name="key" id="text2" value="" disabled="disabled"></td> </tr>
</table>

I want to show the both textbox A and selectbox value B in ShowValuetextbox(1st textbx value come then selectbox),for this I have written the jquery :

<script type="text/javascript">
$("#text1").keyup(function() {
$("#text2").val($("#text1").val() + $(this).find('option:selected').val()).change();
});

$("#select").keyup(function(){
$("#text2").val($("#text1").val() + $(this).find('option:selected').val()).change();
});
</script>

not getting the expected output,any inputs guys……..

  • 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-07T16:28:49+00:00Added an answer on June 7, 2026 at 4:28 pm

    Thanks all of you for sharing your inputs but I have written this(though showing a comment in the textbox2)but This is working for me :

       <script type="text/javascript">
       $(document).ready(function(){
      $("#text1").keyup(function(){
    //   $("#text2").val($("#text1").val());
       $("#text2").val($("#text1").val() + $(this).find('option:selected').val()).change();
      });
    });
    
         $(document).ready(function(){
      $('select[name="selectbox"]').change(function() {
        var selectedValue = $(this).find('option:selected').val();
        $('input[name="key"]').val(selectedValue);
        $("#text2").val($("#text1").val() + $(this).find('option:selected').val()).change();
      });
    
    });
     </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to hide and show my text box according to drop down select
I have this code that Show/Hide a text box if I select a category
I am displaying text in a rich textbox and i want it to show
I want then when user select the date from datepicker on textbox it will
i want to show textbox in asp.net dynamically how it is possible in asp.net
I want show an information page after success db opartions. And after the info
hii I want show a pop up Dialog box when i click on to
On UI I have a TextBox. I want to show Tree element when user
I am using a UIView to show a form with a text box(text), text
Here is my run-of-the-mill drop down: <select name=> <option value=>--Select One--</option> <option value=textarea>Text Area</option>

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.