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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T22:44:23+00:00 2026-06-16T22:44:23+00:00

This is my second day with Jquery and I have a dropdown-list each time

  • 0

This is my second day with Jquery and I have a dropdown-list each time a user selects an option on that list it is shown on a textbox using the change method how can i use Jquery so that when the page first loads the first element on that dropdownlist shows in the textbox?

 <script type="text/javascript">
 $('#textboxx')= $('#dropdown'); // this line doesn't work how can i make it 
        $(function () { 
            $('#dropdownn').change(function () {
                var selectedValue = $(this).val();
                $('#textboxx').val(selectedValue);
            });
        });

</script>

The code below started with the $function() works correctly but as I said im having trouble binding the dropdownlist value to the textbox when the page is first loaded.

  • 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-16T22:44:24+00:00Added an answer on June 16, 2026 at 10:44 pm

    You need to assign the selected value of select to textbox on document.ready.

    Change

    $('#textboxx')= $('#dropdown');
    

    To

    $('#textboxx').val($('#dropdown').val());
    

    And put in document.ready, You code would be

    <script type="text/javascript">
    
            $(function () { 
                $('#textboxx').val($('#dropdown').val());
                $('#dropdownn').change(function () {
                    var selectedValue = $(this).val();
                    $('#textboxx').val(selectedValue);
                });
            });
    
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I strugle with this for second day... I have an NSArray of ints, wrapped
I have a user form that has dropdown boxes which i have populated using
I know I'm a newbie in Rails but this is the second day I'm
this is the second game that I'm having issues with in the same area...
I have the following paragraphs: <p>This is a first paragraph.</p> <p>This is a second</p>
This is my second day using FLEX and AS 3.0 so I am very
I am completely new to Sencha 2 Touch. This is my second day playing
Updated with actual JSON Response, Messed up last time. It is my second day
I have this jQuery script: // sorting the names of the fields we're hiding
I have this situation: I have a page where I have a list of

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.