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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:59:42+00:00 2026-06-09T14:59:42+00:00

Okay StackOverflow – this is a weird one. The Problem So I have a

  • 0

Okay StackOverflow – this is a weird one.

The Problem

So I have a “button” (really just a div with a javascript onclick listener) that gets its text from a database via json on page load. (It makes sense given the application). We are not supporting IE < 9.

The problem is that the text inside the div does not show up in a fresh instance of IE9. HOWEVER, when I open up the developer console (to try to figure out what went wrong) and refresh the page, IE acts as though nothing ever went wrong and populates the button text correctly. It works in every other browser.

What.

The Code

So here’s what I have in PHP:

<div class="dark-button notification-button" data-notification="NOTIF_A">
    <span class="float-right">&#9654;</span>
</div>

Javascript (using Jquery 1.8.0):

$('document').ready(refreshNotificationButtons('.notification-button'));
function refreshNotificationButtons(buttons){
    var buttons = typeof buttons != 'object' ? $('.notification-button') : buttons;
    var allNotifications = {};
    var buttonsCount = 0;
    buttons.each(function(){
        var button = $(this);
        if(typeof button.attr('id') == 'undefined') button.attr('id', 'notif-button-' + buttonsCount);
        buttonsCount ++;
        if(typeof allNotifications[button.attr('data-notification')] == 'undefined'){
            allNotifications[button.attr('data-notification')] = [button.attr('id')];
        } else {
            allNotifications[button.attr('data-notification')].push(button.attr('id'))
        }
    });
    $.get(
        '/notifications/get_notifications/' + $.map(allNotifications, function(x, abbr){return abbr}).join(','),
        '',
        function(data){
            $(data).each(function(){
                if (typeof allNotifications[this.Notification.NotificationAbbr] != 'undefined'){
                    console.log(this); //debug
                    buttonEl = $('#' + allNotifications[this.Notification.NotificationAbbr]);
                    if(this.Notifications_User.UserID != null) buttonEl.addClass('notification-button-remove');
                    buttonEl.attr('data-notification-id', this.Notification.Notifications_TableID);
                    buttonEl.append($('<span class="notification-button-signup-span">' + this.Notification.EnableText + '</span><span class="notification-button-remove-span">' + this.Notification.DisableText + '</span>'));
                }
            });
        },
        'json'
    );

}

Images

Button before opening dev console:

Button before opening dev console

Button after opening dev console and refreshing:

Button after opening dev console

Conclusion

Any ideas? I’d be happy to post more code if you would like to see it! Thanks in advance.

  • 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-09T14:59:43+00:00Added an answer on June 9, 2026 at 2:59 pm

    As commented above, console.log() doesn’t work so well in IE when there is no console open to write to.

    You can either remove the calls to console, or add in this plugin (developed by Paul Irish)

    http://paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/

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

Sidebar

Related Questions

Okay so I read this post http://facebook.stackoverflow.com/questions/10373897/deleting-a-previosly-posted-article-with-opengraph-or-check-if-said-article-has but I'm using the news.reads action type.
Okay, I know questions like this exist in multiple forms across StackOverflow and other
Okay this question is very simple: I have a facebook page, and a website.
Okay, I think I've ready every post on StackOverflow regarding this and still no
Okay so I have the sql to work this out as asked in the
Okay since I have little experience with this stuff and the Facebook documentation is
Okay I have created an application where in one of the screens I have
Okay so I have two import pieces of code involved in this. This first
Okay, this is a pretty weird question, but the situation is this. I've got
I hope its okay I ask this, I searched around stackoverflow and found similair

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.