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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:59:53+00:00 2026-06-12T13:59:53+00:00

<script type=text/javascript src=js/jquery.js></script> <script type=’text/javascript’ src=’js/jquery.autocomplete.js’></script> <link rel=stylesheet type=text/css href=css/jquery.autocomplete.css /> The autocomplete works

  • 0
<script type="text/javascript" src="js/jquery.js"></script>
<script type='text/javascript' src='js/jquery.autocomplete.js'></script>
<link rel="stylesheet" type="text/css" href="css/jquery.autocomplete.css" />

The autocomplete works for the first time when the page is refreshed and i enter upto 4 character if i backspace and enter other character from start it doesn’t work , can someone help me why is this happening

$().ready(function() {


    $("#customername").autocomplete("ajax/customerlist.php", {
        width: 260,
        dataType: 'json',
        matchContains: false,
        selectFirst: false,
        minlength:4,
        parse: function(data) {

                var array = new Array();
                for(var i=0;i<data.items.length;i++)
                {       //alert(data.items[i].name);
                        array[array.length] = { data: data.items[i], value: data.items[i], result: data.items[i].name };
                }
                return array;
        },
        formatItem: function(row) {                     
                var name = '';
                if (row.first_name && row.last_name)
                        name = '('+row.first_name+', '+row.last_name+')';
                else if (row.first_name)
                        name = '('+row.first_name+')';
                else if (row.last_name)
                        name = '('+row.last_name+')';

                return row.name+' '+name;
        }
    });

    $('#customername').result(function (event, data, formatted) {
      $( "#cust" ).val( data.id );
      var add= data.add1+data.add2;
      $( "#address" ).val( add );
      $( "#email" ).val( data.email );
      $( "#phone" ).val( data.phone );
      $( "#mobile" ).val( data.mobile );

    });
});

the php code is

$getuser=$db->execute("select * from `customer` where customer_name like '%".mysql_$_REQUEST['q']."%'  ");


while($getuserlist = $db->fetchAll($getuser)) {

$list['items'][]=array('name' => $getuserlist['customer_name'],'id'=>$getuserlist['customer_id'],'add1'=>$getuserlist['add1'],'add2'=>$getuserlist['add2'],'city'=>$getuserlist['city'],'state'=>$getuserlist['state'],'pincode'=>$getuserlist['pincode'],'email'=>$getuserlist['email'],'phone'=>$getuserlist['phone'],'mobile'=>$getuserlist['mobile']);

}

echo json_encode($list);
  • 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-12T13:59:54+00:00Added an answer on June 12, 2026 at 1:59 pm

    change this

    $().ready(function() {
    

    to

    $("#customername").keyup(function() {
    

    it will run whenever you type in "#customername"

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

Sidebar

Related Questions

#!/usr/bin/perl print Content-type: text/html \n\n; print qq(<html> <head> <script type=text/javascript src=/jquery.js></script> <script> jQuery(document).ready(function(){ jQuery(#form_lang).submit(function(e){
I have this code <html> <head> <script src=jquery-1.7.2.min.js type=text/javascript></script> <script src=jquery-ui-1.8.20.custom.min.js type=text/javascript></script> <script type
this is my ajax call <script src = js/jquery.js type = text/javascript></script> <script type=text/javascript>
Here is fragments of my HAML view: %script{:type => text/javascript, :src => assets/application.js} :javascript
I have fetched json through <script> function getjs() { var script =document.createElement(script); script.setAttribute(type,text/javascript); script.setAttribute(src,http://localhost:8080/vigs/f4json?user=3&callback=gr);
<script type=text/javascript> if (typeof jQuery == 'undefined') { var script = document.createElement('script'); script.type =
I have a jQuery script: $.ajax({ url: /scripts/secure/development/ajax.asp, type: POST, dataType: text, data: cmd=addresses,
Was looking at ways to clean up the following link : <a href=javascript:void((function()%7Bvar%20e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','http://assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)%7D)());><img src=/images/Social%20Media/pinterest.png/></a>
I have this jQuery script var dataString = class_id=+class_id; $.ajax({ type: POST, url: page.php,
I'm attempting to select all <script type=text/html> tags in a page. I use <script>

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.