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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:29:19+00:00 2026-06-14T10:29:19+00:00

index.php <html> <head> <title>ы</title> <script type=text/javascript src=https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js></script> <script type=text/javascript src=jquery.autocomplete.js></script> </head> <body> <script type=text/javascript>

  • 0

index.php

<html>
<head>
    <title>ы</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
<script type="text/javascript" src="jquery.autocomplete.js"></script>
</head>
<body>
<script type="text/javascript">
    $(document).ready(function(){
        $("#search").keyup(function(){
          $("#search").autocomplete("json.php", {
            delay:10,
            minChars:4,
            maxItemsToShow:3
            }
          );
          }); });
      //?word=" + $("#search-text").val()
</script>
<form action=""><input type="search" id="search"> <input type="submit"></form>
<body>
</html>

json.php

<?php
echo json_decode($_GET['q']);

How do make this code to work? How I can use the file json?
How in php to handle the request and return the result to the autocomplete worked?
Maybe there are better solutions?
The official documentation does not contain the server-side code example!

looked response 200ok. no body. echo json_decode ($ _GET [‘q’]); error here, the question is where?

  • 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-14T10:29:20+00:00Added an answer on June 14, 2026 at 10:29 am
    $(function() {
        $( "#city" ).autocomplete({
            source: function( request, response ) {
                $.ajax({
                    url: "http://sitetesting.kiev.ua/ajax.php",
                    dataType: "jsonp",
                    data: {
                        name_startsWith: request.term
                    },
                    success: function( data ) {
                        response( $.map( data.geonames, function( item ) {
                            return {
                                label: item.countryName
                            }
                        }));
                    }
                });
            },
            minLength: 2
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

index.php <!DOCTYPE html> <html> <head> <meta http-equiv=Content-Type content=text/html; charset=utf-8 /> <title>Form submit in php
I have a PHP script (index.php) that includes an index.html file in a sub-directory
I have just a basic html form within index.php which contains two text fields:
My index.php contains a bunch of php and javascript code, and html formatted in
Let's say i have an index.php that has html in it that looks like
I'm using mod_rewrite to rewrite .html to .php. RewriteRule ^([0-9a-zA-Z-_]+)\.html$ index.php?p=$1 [L] But, I'm
I want to convert these URLs to SEO friendly URLs: index.php?t=1&s=1&offset=50&hits=50 ---> index-t-1-s-1-offset-50-hits-50.html index.php?t=1&s=1
I'm developing web page which has main file index.php as follows: include('UserClass.php'); include('html/top.php'); $user
There is a website in Joomla, the NavigationPath ist domain.tld/index.php/produkte/produkt1.html this work fine. But
I have a template in joomla without index.php I only have index.html, css file,

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.