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

The Archive Base Latest Questions

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

JSON URL : http://en.wikipedia.org/w/api.php?format=json&action=opensearch&search= +str+&namespace=0&suggest= Here str may be any 2-3 char for an

  • 0

JSON URL : http://en.wikipedia.org/w/api.php?format=json&action=opensearch&search=“+str+”&namespace=0&suggest=

Here “str” may be any 2-3 char for an example
str = ‘nas’
then JSON URL : http://en.wikipedia.org/w/api.php?format=json&action=opensearch&search=nas&namespace=0&suggest=

I want to grab all result and put these result in a table

I tried AJAX, JSON, JQUERY
Can any one send me working Code for doing this .

My Dummy Code as :-

<!DOCTYPE html>
<html>
<head>
<script type="application/javascript">
function FillSearchBox(str)
{
    var xmlhttp = new XMLHttpRequest();
    xmlhttp.onreadystatechange=function()
    {

        if (xmlhttp.readyState==4 && xmlhttp.status=200)
        {
            //Pointer never Comes in this Section (If I Debuug I got xmlhttp.status=0 every time) 
            var JSONObject = JSON.parse(xmlhttp.responseText);
        }
    }
    var strr= "http://en.wikipedia.org/w/api.php?format=json&action=opensearch&search="+str+"&namespace=0&suggest=";
    xmlhttp.open("GET",strr,true);
    xmlhttp.send();
}
</script>
</head>
<body>
<form>
<input type="text" name="wikisearch" id=""   onkeyup="FillSearchBox(this.value)" />
</form>
<!-- add Table or Div Here -->
</body>
</html>
  • 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-10T09:05:47+00:00Added an answer on June 10, 2026 at 9:05 am

    You need to use JSONP to make cross-origin requests:

    function gotData(d) { alert(d); }
    
    var s = document.createElement('script');
    s.src = "http://en.wikipedia.org/w/api.php?format=json&action=opensearch&search="+str+"&namespace=0&callback=gotData";
    s.appendTo(document.body);
    

    Note that this is much easier with jQuery.

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

Sidebar

Related Questions

I'm trying to retrieve articles through wikipedia API using this code $url = 'http://en.wikipedia.org/w/api.php?action=parse&page=example&format=json&prop=text';
I am trying to parse the JSON at this URL: http://maps.googleapis.com/maps/api/geocode/json?address=canada&sensor=false in Objective-C. I'm
I'm trying to retrieve yahoo autocomplete. Yahoo's JSON url is this: http://ff.search.yahoo.com/gossip?output=fxjson&command=query So I
I am using this URL http://search.twitter.com/search.json to grab tweets with the hash tag #SameHashTag
Today I struggled with the following: $.ajax({url:'http://maps.google.com/maps/api/geocode/jsonaddress=Karachi&sensor=false&output=json&callback=?', dataType: 'json', success: function(data){ //eval((+data+)); alert(data); }
jQuery.ajax( { url:'http://en.wikipedia.org/wiki/Football', type:'get', dataType:'jsonp', success:function(data){alert(data);}, } i want to read wikipedia page from
I have the following code: $.ajax({type: 'get', mode: 'abort', dataType: 'json', url: 'http://localhost/1.php', data:
I am parsing json from the following url http://www.kaverisoft.com/careers/assignments/android/a1.php with the following code public
If I put this URL: http://maps.googleapis.com/maps/api/geocode/json?address=la%20coru%C3%B1a,%20la%20coru%C3%B1a,%20espa%C3%B1a&sensor=false&region=es I get this json object: { results :
I need to add a URL typically in the format http:\somewebsite.com\somepage.asp. When I create

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.