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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:13:46+00:00 2026-06-18T09:13:46+00:00

Veiw code is below <select name =dept id=dept> <option value=1>Software</option> <option value=2>Marketing</option> </select> <input

  • 0

Veiw code is below

<select name ="dept" id="dept">
   <option value="1">Software</option>
   <option value="2">Marketing</option>
</select>

<input name="section_name" id="section_name" type="text">
<input name="emp_id" id="emp_id" type="text">

Jquery Code is below

$(document).ready(function() {
$('#section_name').keydown(function(){
    $(this).autocomplete({
        source: "<?php echo base_url(); ?>index.php/search_con/section_name",
        minLength: 0,
        autoFocus: true,
        select: function(event, ui)
        {
        }
    });
  });   
$('#emp_id').keydown(function(){
    $(this).autocomplete({
        source: "<?php echo base_url(); ?>index.php/search_con/emp_id",
        minLength: 0,
        autoFocus: true,
        select: function(event, ui)
        {
        }
    });
  });

});

Basically I want that when i will select Department dropdown, it will come autocomplete in section name, when in autocomplete section name will search section name and will select then here will come emp_id autocomplete and i will to do search Emp ID .

Other way i can say, It will be department’s under section name and section name’s under emp_id.

How can i solve successfully, Please any help me.

  • 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-18T09:13:47+00:00Added an answer on June 18, 2026 at 9:13 am

    Make two hidden fields or two variables as you like but I will do it with variables

    When the user selects some department you should tell the server to search in that department so you will need to modify your BE code so you can achieve this

    var current_department = ""; 
    
    var current_lang = ""; 
    
    //this will be called when ever the select changed 
    
    $('#dept').change(function(){
    current_department =  $(this).find(":selected").text();
    }); 
    

    In the department autocomplete you need to send the variable
    here it will send the department name you can set val()instead of text() it’s up to you

    Now the autocomplete should now about that so

    $('#section_name').keydown(function(){
        $(this).autocomplete({
            source: "<?php echo base_url(); ?>index.php/search_con/section_name/"+current_department,
            minLength: 0,
            autoFocus: true,
            select: function(event, ui)
            {
                   //here you need to tell the next autocomplete what lang you selected e.g. PHP 
                  current_lang = ui.item.value; //or .text it's up to you 
            }
        });
      });   
    

    So the next autocomplete should be like this

    $('#emp_id').keydown(function(){
        $(this).autocomplete({
            source: "<?php echo base_url(); ?>index.php/search_con/emp_id/"+current_lang,
            minLength: 0,
            autoFocus: true,
            select: function(event, ui)
            {
            }
        });
      });
    
    });
    

    Please remember to modify your ServerSide code
    I hope this can help you 🙂

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

Sidebar

Related Questions

From jQuery UI site (veiw source): $( #birds ).autocomplete({ source: search.php, minLength: 2, select:
I want to create a veiw and then select from it in one query,
I used the code to try set the label text but its not working.
im trying to use the graphic veiw of QT to draw lines it's possible
I am attempting to use mechanize to veiw and collect data from various websites.
How can I get effect on specific row of grid veiw <asp:GridView ID=gvSearch runat=server
update: The code is fine. It was simply a wrong pointer to the database.
I have a LinearLayout with a custom view on top of it. The veiw
How would you evaluate project size? Part A: Before you start a project. Part
** New EDIT ** so what I'm trying to do is this. I want

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.