0

The following seems to work in Firefox & Chrome, but NOT in Internet Explorer (11) - where it does not want to display the facebook "Share" button... please help:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta http-equiv=Content-Type content="text/html; charset=utf-8" />
  </head>
  <body>
    <div id="fb-root"></div>
    <script>
window.fbAsyncInit = function() {
  FB.init({appId : '421773064573783', status : false, cookie : true, xfbml : true});
};

(function(){
   if (document.getElementById('facebook-jssdk')) {return;}
   var fjs = document.getElementsByTagName('script')[0];
   var js = document.createElement('script');
   js.id = 'facebook-jssdk';
   js.src = '//connect.facebook.net/en_US/all.js';
   fjs.parentNode.insertBefore(js, fjs);
}());

function clickProceed() {
  document.getElementById('DIV1').style.display = 'none';
  document.getElementById('DIV2').style.display = 'inline';
}
    </script>
    <div id="DIV1" style="display:inline;">
      Click to proceed:
      <input type="button" value="Proceed" onClick="clickProceed();"></input>
    </div>
    <div id="DIV2" style="display:none;">
      Click to share:
      <div class="fb-share-button" data-href="http://www.stackoverflow.com"
      data-width="500" data-type="button_count"></div>
    </div>
  </body>
</html>
Free Bud
  • 746
  • 10
  • 30
  • facebook buttons can't be inserted dynamically for some reason – adeneo May 12 '14 at 17:19
  • There seems to be a partial answer here: [link](http://stackoverflow.com/questions/10137838/internet-explorer-like-button-madness), however it uses jquery which I don't... – Free Bud May 12 '14 at 18:49
  • The answer with the most votes in [here](http://stackoverflow.com/questions/12291017/facebook-like-buttons-not-displaying-when-loaded-hidden) works perfectly in all browsers! – Free Bud May 13 '14 at 05:42

0 Answers0