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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:49:10+00:00 2026-06-09T11:49:10+00:00

I have this code which works at retrieving data from You Tube. I can

  • 0

I have this code which works at retrieving data from You Tube. I can see this by the alert message. The problem is in IE8 and below, it doesn’t output the list of 3 items to the page. It only outputs the last image.

You can view the code here on jsfiddle

Any help much appreciated.

$.each(data.feed.entry.slice(1, 4), function(i, item) {
                        //if(i == 3) return false;
                        var title = item.title.$t;
                        var url = item.link[0].href;
                        var thumbUrl = item.media$group.media$thumbnail[0].url;
                        thumbs_data += '<li><a href="'+ url +'" title="'+ title +'"><img alt="'+ title+'" src="'+thumbUrl+'"</a></li>';
                        alert(thumbs_data);
                    });
  • 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-09T11:49:12+00:00Added an answer on June 9, 2026 at 11:49 am

    After looking at the code in IE8, one possible problem may be that item.title.$t has quotation marks in it which I think may be messing up your generated HTML. You could try remove the quote marks by changing this:

    var title = item.title.$t;
    

    to this:

    var title = item.title.$t.replace(/"/g, "");
    

    And, the other problem I found is that you are missing a closing brace on the img tag in your generated HTML.


    Change the thumbs_data line to this to add the closing > for the img tag:

    thumbs_data += '<li><a href="'+ url +'" title="'+ title +'"><img alt="'+ title+'" src="'+thumbUrl+'"></a></li>';
    

    Once you fix those, you can see this jsFiddle work in IE8: http://jsfiddle.net/jfriend00/7L2Ws/

    Note: I found this problem by outputting the generated HTML you were adding to thumbs_data to console.log() each time through the loop so I could look at the HTML to see where the problems were.

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

Sidebar

Related Questions

I have this code which compiles and works as expected: class Right {}; class
I have this code in my cfm, which works <cfif not StructIsEmpty(form)> <cfset larray
I have this code (which is way simplified from the real code): public interface
I have this code which will include template.php file from inside each of these
I have this code which reads all the files from a directory. File textFolder
I have written the following code which works, but im wondering can I make
I have this code which works nice in Chrome and Firefox, but on IE
I have this code which works. $(document).ready(function(){ $('form').live('submit', function(){ // have to do it
I have this code which works. #!/usr/bin/perl use warnings; use strict; use Net::LDAP; use
I have a problem retrieving items from a fairly large list. I can quickly

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.