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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:53:09+00:00 2026-05-12T11:53:09+00:00

I have this thing working mostly. What I don’t get is, if I have

  • 0

I have this thing working mostly. What I don’t get is, if I have the file on my desktop and drag it into a browser, it works. If I upload the same file to my website and visit it, it displays nothing in Firefox. Last night it worked in Safari, but today it does not. Is something really weird in this code?
Here is the pastie in case pasting all this in here does not work 🙂

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript" charset="utf-8"></script>

<style type="text/css" media="screen">
    body{
        background: #353535;
        color: #fff;
        font-size: 62.5%;
        padding: 10px;
    }
    p{
        font-size: 1.6em;
        font-family: Arial, "MS Trebuchet", sans-serif;
    }
    span{
        font-size: 1.6em;
        font-variant: small-caps;
    }
    ul {
        list-style: none;
    }
    li {
        font-size: 1.6em;
        text-transform: capitalize;
    }
    img{
        float: left;
        margin: 10px;
    }
</style>

<!-- actual api http://api.tinychat.com/designtalk.json -->
<!-- testing file  test.json -->

  <script>
  $(document).ready(function(){
    $.getJSON("http://api.tinychat.com/designtalk.json",
        function(data){

        $('#name').append(data.name);
        $('#topic').append(data.topic);
        $('#broadcast').append(data.broadcaster_count);
        $('#count').append(data.total_count);
        $('#priv').append(data.priv);

if(!data.name)
{
    alert("Room empty!")
}

    var $nameList = $('<ul></ul>');

    $.each(data.names, function (i, val) {
      $('<li></li>').appendTo($nameList).html(val); 
    });

    $('#container').append($nameList);

    $.each(data.pics, function (i, val) {

        $("<img/>").attr("src", val).appendTo("#images");

    });

        });

  });
  </script>
</head>
<body>
    <p id="name"><span>Room Name:</span> </p>
    <p id="topic"><span>Current Topic:</span> </p>
    <p id="broadcast"><span>Number Broadcasting:</span> </p>
    <p id="count"><span>Total in Room:</span> </p>
    <p id="priv"><span>Number with Privileges:</span> </p>

    <div id="container"><span>Who is Online?</span></div>
    <div id="images"></div>
</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-05-12T11:53:09+00:00Added an answer on May 12, 2026 at 11:53 am

    You can create HTML elements programmatically, to build an HTML List for example:

    $('<div></div>').appendTo('#container').html(data.title);
    
    var $nameList = $('<ul></ul>');
    
    $.each(data.names, function (i, val) {
      $('<li></li>').appendTo($nameList).html(val);
    });
    
    $('#container').append($nameList);
    

    Example here.

    Without jQuery:

    var container = document.getElementById('container'),
        title = document.createElement('div'),
        nameList = document.createElement('ul'), li;
    
    title.innerHTML = data.title;
    for (var i = 0; i < data.names.length; i++) {
      li = document.createElement('li');
      li.innerHTML = data.names[i];
      nameList.appendChild(li);
    }
    
    container.appendChild(title);
    container.appendChild(nameList);
    

    Example here.

    Edit: In response to your comment, you were missing the Flickr specific parameter jsoncallback to make the JSONP request, and also in the structure of the JSON response the names member doesn’t exists, I think you mean items.

    Check your feed example fixed here.

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

Sidebar

Related Questions

I swear, I have this exact thing working on another page. I'm such a
I have this thing that i need to do and some advices will be
I have this Java code, and I want to do the same thing in
I have this code (C#): using System.Collections.Generic; namespace ConsoleApplication1 { public struct Thing {
Here is the thing. Right now I have this e-commerce web site where people
I have to ask this, because: The only thing I recognize is, that if
I would have thought that this would be an easy thing to do, but
Does anyone have any experience with this sort of thing? I'm talking about applets
I am pretty new to this iPhone dev thing but so far I have
I'm working on an asp.net application. I have a Domain assembly (containing mostly command

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.