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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:36:26+00:00 2026-06-04T15:36:26+00:00

Load when the browser is open Thats my previous question related to this topic.

  • 0

Load when the browser is open

Thats my previous question related to this topic.

My problem is that the server api i use has added a new item to the list and as i stated in the previous question im not very skilled with API’s or jQuery, therefore i would like to know what can you recomend me to read about this and also pratical solutions. I need to make it so the field that the js uses is only {“name”:”Arthas”,”slug”:”arthas”,”build”:”12340″,”status”:1} and not the rest.

Many thanks in advance.

This is the api -> http://api.neverendless-wow.com/server-status

{"servers":[{"name":"Arthas","slug":"arthas","build":"12340","status":1},{"name":"Deathwing","slug":"deathwing","build":"13623","status":1}],"alerts":[]}

This is my current js

function checkStatus()
{
    jQuery.getJSON("http://api.neverendless-wow.com/server-status",function(data){ 
    if (data.status == '1')     {jQuery('#ServStat').addClass('online').removeClass('offline').attr('label','Online');}
    else     {jQuery('#ServStat').addClass('offline').removeClass('online').attr('label','Offline');}});
}
checkStatus();
{
    setInterval(changeState, 300000)
}
  • 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-04T15:36:27+00:00Added an answer on June 4, 2026 at 3:36 pm

    You need to use data as array (data[0]) and hence your code will be as follows:

    function checkStatus()
    {
        jQuery.getJSON("http://api.neverendless-wow.com/server-status",function(data){ 
            if (data.servers[0].status == '1') { 
                jQuery('#ServStat').addClass('online').removeClass('offline').attr('label','Online');
            }
            else {
                jQuery('#ServStat').addClass('offline').removeClass('online').attr('label','Offline');
            }
        });
    }
    
    checkStatus();
    {
        setInterval(changeState, 300000)
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is the situation: I use the Java API of Selenium 2 to open
ASP.NET Image Caching Problem (How to Disable it?) .IE browser load old image from
In situations where a browser is under intense load I find that animated gifs,
I have a small problem that I want to load a url in web
I want to open page [pop up] on page load and my page has
My browser (firefox) prevents any popup from loading, and loads links that open new
In Windows, that is. I think the answer to this question is that I
how to open default blackberry browser when click on browserfield. i am trying load
I spoke about this in a previous question, but I have since narrowed down
I made a special button that thru the use of this js shows the

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.