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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:39:21+00:00 2026-06-06T18:39:21+00:00

i want to make autocomplete for many text input field… but with this autocomplete

  • 0

i want to make autocomplete for many text input field…
but with this autocomplete

<html><head><script type="text/javascript" src="jquery-1.4.js"></script>
<script type='text/javascript' src='jquery.autocomplete.js'></script>
<link rel="stylesheet" type="text/css" href="jquery.autocomplete.css" />
<link rel="stylesheet" href="main.css" type="text/css" />

<script type="text/javascript">

$().ready(function() {
      $("#perkiraan").autocomplete("proses_akun.php", { width:350, max:28, scroll:false });
});

</script>
</head>
<body>
<div class="demo" style="width: 250px;">
<div>
<p>Nama Akun : <input type="text" id="perkiraan"  name="perkiraan" size="65"></p>
</div>
</div>
<div id="pilihan">
</div>

<div class="demo" style="width: 250px;"><div>
<p>Nama Akun : <input type="text" id="perkiraan"  name="perkiraan" size="65"></p>
</div>
</div>  

<div id="pilihan">
</div>
</body>
</html>

i know it because only one same name permit for this jquery…
but i want to add more input text (second, third, etc) below the first that using javascript too without copy paste the scriot and change its name…
help please,,,,

  • 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-06T18:39:23+00:00Added an answer on June 6, 2026 at 6:39 pm

    Working demo http://jsfiddle.net/nckYT/

    Please note DOM should never have the same id attributes for elements which is the case in the sample above. i.e. id="perkiraan" solution use class attribute instead.

    I think the official doc says that if there are multiple same id then it takes the last id-ied element as the identified element.

    further for mutiple element you can use class element for autocomplete like this $( ".perkiraan" ).autocomplete({ that will attach autocomplete with all the elements with class perkiraan. or you can chain the different ids like $( "#perkiraan, #foo" ).autocomplete({ but addaing class will do the trick

    Hope this helps, lemme know if I missed anything, :)

    cose

    <body><div class="demo" style="width: 250px;">
        <div><p>Nama Akun : <input type="text" class="perkiraan"  name="perkiraan" size="65"></p></div></div><div id="pilihan"></div>
        <div class="demo" style="width: 250px;">
    <div><p>Nama Akun : <input type="text" class="perkiraan"  name="perkiraan" size="65"></p></div></div>  <div id="pilihan"></div></body>
    

    Image 1 input 1
    enter image description here

    Image 2 input 2
    enter image description here

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

Sidebar

Related Questions

Im trying to make this dynamic email input field which uses autocomplete on a
I want to make my input field to have jquery autocomplete where I fetch
I am traversing a HTML document using javascript DOM. I want make a list
I have an input field, where I try to make autocomplete suggestion. Code looks
i'm trying to make an autocomplete field in my project. It works fine, but
I want make a bash script which returns the position of an element from
Sorry google translate make mistake, to many mistake, i want make an alarm in
This is for a homework assignment, so I don't want the exact code, but
I have a dictionary of keywords that I want to make available for autocomplete/suggestion
I am using the jQuery autocomplete plugin and have wired up an input field

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.