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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:49:18+00:00 2026-05-17T18:49:18+00:00

I have a form which populates 3 fields based on the selection from an

  • 0

I have a form which populates 3 fields based on the selection from an autocomplete field. That is fine and working well, however I have a 4th field which needs to be populated automatically based upon one one of the fields that got populated automatically by the autocomplete.

what’s the best way to populate that 4th field?

here is my code in main:

<script type="text/javascript">
$().ready(function() {
    $("#PartNumberID").autocomplete({
    source: "ajax/getData.php",
    minLength: 6,
    delay: 100,
    select: function(event, ui) {
         $("#loadingIcon").show();
         $("#PartNumberID").val(ui.item.value);
         $("#BoxID").val(ui.item.dietype);
         $("#PackageID").val(ui.item.pkg);
         $("#loadingIcon").fadeOut();
    },
    change: function(event, ui){
         $("#ProcessID").val("RESULT FROM SQL STATEMENT USING BoxID GOES HERE");
    }
    });
});
</script>

here is my file called process.php which will get the process if you pass the GET var of box, i just need to figure how to send the box var and get the result of this file and put it in the input field:

<?php
require_once '../includes/conn.php';
$sql=mysql_query("SELECT PROCESS FROM data WHERE `box` = \"".$_GET['box']."\" GROUP BY PROCESS") or die("mysql error".mysql_error());
$part['process']=mysql_result($sql,0);
$parts[]=$part;
echo json_encode($parts);
?>
  • 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-17T18:49:18+00:00Added an answer on May 17, 2026 at 6:49 pm

    Something like this..

    change: function(event, ui){
             $.get('ajax/boxQuery.php?box='+$("#BoxID").val,
                   function(result){
                          $("#ProcessID").val(result);
                   }
        }
    

    I used $("#BoxID").val but really you should use the ui argument, i just don’t know of the top of my head what the correct syntax would be.

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

Sidebar

Related Questions

I have a form which contains a select named Client_ID as well as some
I have a multi-step form in which some of the fields are collecting sensitive
So firefox has a nifty mechanism which will try to autocomplete values in fields
I'm trying to implement master detail in a rails form with fields_for. I have
I have a couple classes that can each have comments: class Movie < ActiveRecord::Base
I have found some similar questions like this one, however there are so many
I have Parent page and a Child page('empW.cfm'),which is nothing but a popup window
We currently use PDForm to grab a blank pdf file (no values, just form
I have a set of custom PHP forms within a set of Drupal pages
The question as to how to display an image, stored as an image in

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.