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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:05:24+00:00 2026-05-14T01:05:24+00:00

Ok, the title is a bit confusing, but here’s my predicament. I’ve made a

  • 0

Ok, the title is a bit confusing, but here’s my predicament. I’ve made a web app to track UPS packages internally at work. Currently, you input the tracking number and then select the city it was shipped from. All tracking numbers from an account start with the same X amount of numbers. So if someone entered “1Z8473…” into one input, “Houston, TX” would automatically be entered into the next input. Is this a difficult thing to pull off? Where would I begin?

  • 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-14T01:05:25+00:00Added an answer on May 14, 2026 at 1:05 am

    You could monitor one input for a change, then depending on it’s contents matching a specified value, updating the second one.

    Trivial example:

    <label for="code">Code:</label> <input type="text" id="code" />
    
    <label for="area">Area:</label> <input type="text" id="area" />
    
    <script type='text/javascript'>
        $(document).ready(function(){
            // Listen for change on our code input
            $('#code').keyup(function(){
                var entered = $(this).val();  // text entered in 'code'
    
                // Look up the start of the code (first 6 digits?)
                if(entered.substring(0,6) == '1Z8473')
                {
                    // Set the value of our "area" input
                    $('#area').val('Houston, TX');
                }
            });
        });
    </script>
    

    The above example uses a simple if block to do the matching. As others have posted here, you can send this value to a server side script that does the geolocation for your required areas. So replacing the if above with something like:

    // Look up the area depending on the code entered
    $.getJSON(
        '/geocoder_on_your_site.php?area='+entered, 
        function(data) {
            $('#area').val(data.location);
    });
    

    and on your server, in geocoder_on_your_site.php:

    $input = $_REQUEST['entered'];
    // Assume input is sanitised & checked first..
    ...
    // Look up the area base on location
    $data['location'] = look_up_location($input);
    
    echo json_encode($data);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The title is a bit confusing but here's what I'm after: I have a
I know the title of this question is a bit confusing, but here it
Ok I know the title is a bit confusing but here is my problem:
Okay so the title might sound a bit confusing, but here's what I want
I'll admit the title is a bit confusing but it was hard to come
So I know I butchered the title a bit but if someone looks here
That title is a mouthful and a bit confusing, but you are still reading
The title is a bit confusing I know but I wasnt quite sure how
I know title is a bit confusing ;D but basically what I want to
Title might be a bit confusing, so let me explain. I have a website

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.