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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T01:08:15+00:00 2026-05-15T01:08:15+00:00

Has anyone used jquery to take data from one form field and put it

  • 0

Has anyone used jquery to take data from one form field and put it into another? I’m trying to create a form that when one text input is filled out a second is auto-populated with the first letter of the word that is in the first text input. I’m thinking I can limit the second text input to one character to help get the desired result, but I’m not having luck getting jquery to get the second text input and auto-populate once the first is entered. Here is the code I’m using:

<script type="text/javascript"> 
    jQuery(document).ready(function($) {
    $('#textBox1').keyup(function(){
    if($.trim($('#textBox2').val()) == '')
       $('#textBox2').val($(this).val().substring(0, 1);
});
});
</script>

Also, do I need to have any in the text input fields of the form other than matching “textBox1” id/names? Any suggestions?

  • 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-15T01:08:16+00:00Added an answer on May 15, 2026 at 1:08 am
    $('#textBox2').val($(this).val().substring(0, 1);
    $('#textBox2').val($(this).val().substring(0, 1));
    

    You were missing a parenthesis

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have used jQuery's jqrte text editor, but it has many drawbacks. Could anyone
Has anyone successfully used the jquery plugin wysiwyg ver 0.97 to call an event
I'm using this jQuery plugin here: http://css-tricks.com/examples/MovingBoxes/ Has anyone used it or can you
Has anyone used the jQuery Validation Engine (at http://posabsolute.github.com/jQuery-Validation-Engine/ ) with jQuery 1.4.2? In
Has anyone successfully used jQuery Mobile DateBox with Knockout.js? I'm having trouble getting the
has anyone successfully used the jQuery ui.layout plugin to load jQuery mobile inside the
Has anyone used jQuery to populate an autocomplete list on a textbox using ASP.NET
Has anyone used Hazelcast (preferably 2.1) with play framework 2.0/2.1 (not 1.2+)? I am
Has anyone used both Joone and Encog in production applications? Is there something you
Has anyone used a Java based library for generating excel documents? Preferably support for

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.