Click here to Skip to main content
15,887,596 members
Home / Discussions / JavaScript
   

JavaScript

 
QuestionSimple, Simple Javascript question... Pin
TenmanS1427-Nov-15 4:39
TenmanS1427-Nov-15 4:39 
AnswerRe: Simple, Simple Javascript question... Pin
F-ES Sitecore29-Nov-15 22:16
professionalF-ES Sitecore29-Nov-15 22:16 
GeneralRe: Simple, Simple Javascript question... Pin
TenmanS1414-Dec-15 22:21
TenmanS1414-Dec-15 22:21 
QuestionDisplaying specific data from a CSV file Pin
Emre Testici25-Nov-15 21:44
Emre Testici25-Nov-15 21:44 
QuestionThe problem of JavaScript position Pin
Ted.K-121-Nov-15 21:28
Ted.K-121-Nov-15 21:28 
AnswerRe: The problem of JavaScript position Pin
Peter Leow21-Nov-15 21:55
professionalPeter Leow21-Nov-15 21:55 
AnswerRe: The problem of JavaScript position Pin
Cai Yang17-Dec-15 23:42
Cai Yang17-Dec-15 23:42 
Questionsocial media buttons block page on IE? Pin
V.17-Nov-15 21:18
professionalV.17-Nov-15 21:18 
I added the social media buttons facebook, twitter and linkedin to my page. Works ok on Chrome, Firefox and Safari. It blocks (and sometimes crashes) IE11, I didn't check previous versions yet.
I have no idea why, does anyone have an idea on how to solve it? Right now, I check if it is IE and just disable the tweet and facebook buttons (linkedin is working).

isIE is a boolean that indicates if it is Internet Explorer and "removes" the functionality. (for now)

Here's the rendered code:
twitter
where the button should be
HTML
<div id="tweetlink"></div>
<script>
  if(!isIE){
    document.getElementById('tweetlink').innerHTML = 
    "<div><a href='https ://twitter.com/share' class='twitter-share-button' data-url='urlhere' data-size='large'>Tweet</a></div>"; // --> space between https and : added because CP messed up the markup otherwise
  }
</script>
<script>
  if(!isIE){
    $(window).load(function () {$.getScript('<a href="http://platform.twitter.com/widgets.js">http://platform.twitter.com/widgets.js</a>');});
}
</script>

facebook
part 1
in the head
HTML
<meta property="og:url" content="urlhere" />
<meta property="og:type" content="website" />
<meta property="og:description" content="Solar Timelines for AFFECTS" />
<meta property="og:image" content="http://urlhere/Styles/Images/GUI/STAFF_96x96.png" />
part 2
right after the body tag
HTML
<script>
if(!isIE){
  window.fbAsyncInit = function() {FB.init({appId: 'idhere',xfbml: true,version: 'v2.5'});};
  (function(d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s);
    js.id = id;
    js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.5";
    fjs.parentNode.insertBefore(js, fjs);
  }(document, 'script', 'facebook-jssdk'));
}
</script>
part 3
somewhere in the html where button should be
HTML
<div class="fb-like" data-href="urlhere" data-layout="button_count" data-action="like" data-show-faces="false" data-width="200" data-share="true"></div>

I did google it, but all results popped up with how to block the buttons, not on how to "not block" the page.

Feel free to look at it here[^] @ bottom of the page. In Chrome all buttons are there in IE only linkedin is there.

V.

(MQOTD rules and previous solutions)

QuestionHow to create a number field site column in javascript Pin
Member 1188942312-Nov-15 19:54
Member 1188942312-Nov-15 19:54 
QuestionRe: How to create a number field site column in javascript Pin
ZurdoDev23-Nov-15 3:03
professionalZurdoDev23-Nov-15 3:03 
Questionregex, get the last dollar amount if 2 are present Pin
jkirkerx12-Nov-15 8:51
professionaljkirkerx12-Nov-15 8:51 
AnswerRe: regex, get the last dollar amount if 2 are present [Solved] Pin
jkirkerx12-Nov-15 9:35
professionaljkirkerx12-Nov-15 9:35 
QuestionJavaScript Tour guide Pin
Member 1198488311-Nov-15 21:14
Member 1198488311-Nov-15 21:14 
AnswerRe: JavaScript Tour guide Pin
Richard MacCutchan11-Nov-15 21:19
mveRichard MacCutchan11-Nov-15 21:19 
GeneralRe: JavaScript Tour guide Pin
Member 1198488311-Nov-15 21:33
Member 1198488311-Nov-15 21:33 
AnswerRe: JavaScript Tour guide Pin
Richard Deeming12-Nov-15 2:13
mveRichard Deeming12-Nov-15 2:13 
QuestionJava 2D Array - User Input Pin
Frankie124510-Nov-15 13:02
Frankie124510-Nov-15 13:02 
QuestionRe: Java 2D Array - User Input Pin
Richard MacCutchan10-Nov-15 23:09
mveRichard MacCutchan10-Nov-15 23:09 
QuestionHow can I collect news from differnt sites in one html page Pin
abo sohaib9-Nov-15 20:18
abo sohaib9-Nov-15 20:18 
AnswerRe: How can I collect news from differnt sites in one html page Pin
Afzaal Ahmad Zeeshan9-Nov-15 20:34
professionalAfzaal Ahmad Zeeshan9-Nov-15 20:34 
GeneralRe: How can I collect news from differnt sites in one html page Pin
abo sohaib10-Nov-15 10:36
abo sohaib10-Nov-15 10:36 
QuestionImage does not display in Firefox Pin
ParthiR5-Nov-15 0:57
professionalParthiR5-Nov-15 0:57 
AnswerRe: Image does not display in Firefox Pin
Afzaal Ahmad Zeeshan9-Nov-15 20:39
professionalAfzaal Ahmad Zeeshan9-Nov-15 20:39 
GeneralRe: Image does not display in Firefox Pin
ParthiR11-Nov-15 19:10
professionalParthiR11-Nov-15 19:10 
Questionform question Pin
Member 1197204322-Oct-15 17:43
Member 1197204322-Oct-15 17:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.