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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T05:25:42+00:00 2026-05-23T05:25:42+00:00

My code works fine in other browsers, but in IE8 I get error on

  • 0

My code works fine in other browsers, but in IE8 I get “error on page” – and when I click that it says:
“Exception thrown and not caught Line: 16 Char: 15120 Code: 0
URI: http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js“

I tried linking to jquery.js (rather than jquery.min.js) and to 1.5.1/jquery.min.js,
but problem still remains.

Can someone correct/improve my code for me, or guide me as to where to look. Thanks

<script type="text/javascript">
function fbFetch() 
{
var token = "<<tag_removed>>&expires_in=0";

//Set Url of JSON data from the facebook graph api. make sure callback is set with a '?' to overcome the cross domain problems with JSON
var url = "https://graph.facebook.com/<<ID_REMOVED>>?&callback=?&access_token=" + token;

//Use jQuery getJSON method to fetch the data from the url and then create our unordered list with the relevant data.
$.getJSON(url, function(json)
{
    json.data = json.data.reverse();  // need to reverse it as FB outputs it as earliest last!
    var html = "<div class='facebook'>";

    //loop through and within data array's retrieve the message variable.
    $.each(json.data, function(i, fb)
    {
        html += "<div class='n' >" + fb.name;           
        html += "<div class='t'>" + (dateFormat(fb.start_time, "ddd, mmm dS, yyyy")) + " at " + (dateFormat(fb.start_time, "h:MMtt")) + "</div >"; 
        html += "<div class='l'>" + fb.location + "</div >"; 
        html += '<div class="i"><a target="_blank" title="opens in NEW window" href="https://www.facebook.com/pages/<<id_removed>>#!/event.php?eid=' + fb.id + '" >more info...</a></div>'; 
        html += "</div >";              
    }
    );
    html += "</div>";

    //A little animation once fetched
    $('.facebookfeed').animate({opacity: 0}, 500, function(){
        $('.facebookfeed').html(html);
    });
    $('.facebookfeed').animate({opacity: 1}, 500);
});

};

  • 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-23T05:25:43+00:00Added an answer on May 23, 2026 at 5:25 am

    Does the code do the job in IE8 or does it break? The reason I ask is because if it works as expected you could just wrap it in a try{ } catch{ \\do nothing } block and put it down to another thing IE is rubbish at.

    You may be better off creating an object for the creation of the facebook div. Something like…

    var html = $('<div />');
    html.attr('class', 'facebook');
    

    Then in your each loop you can do this…

    $('<div />').attr('class', 'n').append(fb.name).appendTo(html);
    $('<div />').attr('class', 't').append etc...
    

    Then append html to the facebookfeed object

    Doing this may remove the scope for error when using single quotes and double quotes when joining strings together, which in turn may solve your issue in IE8

    $('.facebookfeed').fadeOut(500, function(){
          $(this).append(html).fadeIn(500);
    });
    

    Hope this helps!

    UPDATE

    The append method is used to add stuff to a jquery object. For more info see here

    So to surround the div’s as you mentioned in the comments you would do something like this…

    var nDiv = $('<div />').attr('class', 'n').append(fb.name);
    $('<div />').attr('class', 't').append(fb.somethingElse).appendTo(nDiv);
    // etc
    

    And then you would need to append that to the html div like so…

    html.append(nDiv);
    

    So that would give you

    <div class="facebook">
         <div class="n">
             value of fb.name
             <div class="t">
                  value of fb.somethingElse
             </div>
         </div>
    </div>
    

    So what you have done is created a new jquery object and appended to that, then appended that to the html object which you have then appended to the facebookfeed div. Confusing huh?!

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

Sidebar

Related Questions

I have code that works in Chrome and Firefox, but not in IE8. <a
The following code works fine in browsers other than IE. In IE, only the
This code works fine to find an available room within certain date, but it
This code works fine in C#: Expression.Lambda(LambdaBody); But none of the methods for building
This code works fine when running in IE. I get a request asking to
I have a GWT 2.3 app that works fine in IE8 and pretty much
This code works fine: $result = $client->__call(optionalInfo, array( new SoapParam(..., client), new SoapParam(..., add_code))
this code works fine until I start scrolling: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
The following code works fine: person = {:a=>:A, :b=>:B, :c=>:C} berson = {:a=>:A1, :b=>:B1,
My below code works fine and is used to populate a <select> item with

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.