I'm trying to add a tweet button to html page , I use the official code from the twitter button generator ,
http://twitter.com/about/resources/buttons#tweet
when I test the page on chrome and Firefox , the button doesn't appear , only an underlined text says : "Tweet"
here is the code :
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
Tweet
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</body>
</html>
I had this same problem, and it drove me nuts until I narrowed it down to cookies possibly being blocked. I was running an Add-On called 'Disconnect' from https://disconnect.me/ . Once I disabled this addon and restarted the browser the Tweet button started working again.
So if you're using that addon or any other one to block cookies or prevent you from being tracked by social networking sites, you'll need to disable it if you want to see the tweet button.
I just noticed that I duplicated #jcaruso's reply.
tl;dr;
Try disabling ad-blocking extensions. For me the problems were caused by disconnect.me extension.
How I found that out? I noticed in the chrome dev console, that request to twitter to load widgets.js gets a 307 redirect to about:blank.
Thanks to that answer I figured out that it's caused by one of the extensions. Disabling the disconnect.me extension fix the problem with twitter and facebook buttons on mine and other pages.
For me it was the chrome extension AdBlock that was causing the issue.
Thanks to others for pointing me in the right direction!
Your code is fine. If you can't see the button, this means you don't have access to twitter.com.
Make sure you can access twitter.com normally via your browser and that your company, firewall, parental control, etc is not blocking access or interfering with it in any way.
See your code in action here It works fine in Firefox, Chrome and IE as I just tested.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
Tweet
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</body>
</html>
Check out the screenshot below, your code's performance in IE 8, Firefox 9, Chrome 16. it works as expected.
Related
I noticed this issue occurring in the past few weeks, and never experienced it before. Basically, In Windows, if I set the default Email to Chrome, mailto links no longer work properly. The browser I am using to click on the link produces different results, but none of them work correctly.
Step-by-step, what I'm doing is:
In Windows > Default apps > Email - set to Chrome
In ANY browser, click a mailto URL
Chrome: Nothing happens
Firefox: Opens new, empty Chrome window
If I set the Default Email to use Firefox, the mailto URLs work fine from all browsers.
Here is some HTML code I was able to reproduce the bug in:
<!DOCTYPE html>
<html>
<body>
This is a test.
</body>
</html>
I am inclined to believe this may be a bug between Windows and Chrome, because this only very recently started happening.
Some things I tried include:
Changing Chrome Privacy settings
Other threads suggested Handlers settings in Chrome, which did not solve this
Verify the default program was set correctly (Default Programs > Associate a file type or protocol with a program)
Use window.open instead of href (not that this would be a good solution, but it yielded similar results)
I am learning HTML from The World's Largest Web Developer Site w3schools.com
I am having an issue at this URL from HTML Links chapter.
The Homepage of World Wide Web Consortium (W3C)'s website opens when I click on the hyperlink https://www.w3.org/ but same is not the case when I click on a hyperlink https://www.google.com/ to open Google's homepage.
It's giving me error as "www.google.com refused to connect."
Why so?
This issue is coming when I tried to run the below code in W3Schools' "Try it Yourself" editor. When I tried to run the same below code from localhost in my web browser it worked perfectly fine and Google's homepage is opened.
Consider the code tried :
<!DOCTYPE html>
<html>
<body>
<h2>Absolute URLs</h2>
<p>W3C</p>
<p>Google</p>
</body>
</html>
So my question is what's the issue with W3Schools' "Try it Yourself" editor?
There is no problem, Google just don't allow you to put them in an iframe (which is what w3schools use). If you right click and press 'open in new tab', it will work.
If you inspect the website and open the console, you can see what the error is. In this case the output is: Refused to display 'https://www.google.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'. Which means that google simply doesn't allow to display google.com on an iframe, which is what is being used by w3schools.
I am using google reCAPTCHA V.2 in my website, which is running on a localhost in a MAMP server.
I am doing all the widget integration correctly (both on frontEnd and server side), the proof is that the widget displays correctly on firefox 38.0.1 and that the validation works smoothly
http://imgur.com/cm83p39
but it displays strangely on chrome
http://imgur.com/KHC7hMN
Needless to say, I am doing everything that needs to be done. Again, the proof is that it is working in firefox, but not in chrome...
Without going into detail, in HTML the page looks something like this:
<!DOCTYPE html>
<html>
<head>
<title>reCAPTCHA demo</title>
<script src='https://www.google.com/recaptcha/api.js?hl=en'></script>
</head
<body>
<form id='reCaptcha' action='myValidationScript.php' method='POST'>
<div class="g-recaptcha" data-sitekey="myKey">
</div>
<input type='submit'>
</form>
</body>
</html>
The problem is not on the server, the code I use in PHP to do the validation looks something like this (again, without going into detail).
<?php
if(isset($formFields['g-recaptcha-response']))
{$captcha=$formFields['g-recaptcha-response'];}
$secretCaptchaKey='mySecretKey';
$response=file_get_contents(
"https://www.google.com/recaptcha/api/siteverify?secret=$secretCaptchaKey&response=".$captcha."&remoteip=".$_SERVER['REMOTE_ADDR']
);
$response = json_decode($response, true);
if($response["success"]==true){echo('yay!!')}
else{echo('nay')}
?>
The closest answer I've read in the web is from google's FAQ where they discuss the "no_checkbox" issue saying that my client does not have the necessary resources to load the widget and that it falls back to an alternative challenge. But the example they put there (an image with text) is far from the ugly texts I am getting in chrome...
Again, please understand there is no server problem with this, the proof is that it works on firefox...
For information, I had the exact same issue in the past and I solved it by upgrading the browser. Now I have it again in chrome...
any ideas?
I had a similar issue here: reCAPTCHA working flawless in Firefox (51.0.1) and displaying the message "invalid domain for site key" in Chromium (55.0.2883.87).
A workaround was to disable the "Verify the origin of reCAPTCHA solutions" checkbox in the reCAPTCHA configuration for my domain which made reCAPTCHA work in Chrome.
Of course, this is not a sustainable solution. Upon further investigation I found out the problem was caused by the German "Umlaut" characters in my domain name. To solve it, I just needed to add the Punycode of my domain to the reCAPTCHA config.
I'm developing a web system now, and have debugged a very strange bug just now.
First I describe the bug itself here.
Problem:
When visit http://mysite/, it redirects to login and do logout at once.
There is a page, which url is /site.php?arg1=xxx&arg2=xxx everything is well in chrome, but when I use the ie8, after this page loaded, the account is logged out!
Bug Location:
After a long term of debugging, I found that the point which causing the problem is:
<img class="item_thumbnail" src="" />
If I remove this tag, everything become good.
So I'm wondering: when the <img> tag render, what's its behavior? Will it request the login page? But everything is in mass with ie.
What cause this problem? And what will ie an non-ie deal with the img-src?
Need your help!
As I suspected, according to
Empty image src can destroy your site
Internet Explorer makes a request to the directory in which the page
is located. For example, if you have a page running at
http://www.example.com/dir/mypage.htm that has one of these patterns,
IE makes a request to http://www.example.com/dir/ to fill in the
image.
Safari and Chrome make a request to the actual page itself. So
the page running at http://www.example.com/dir/mypage.htm results in a
second request to http://www.example.com/dir/mypage.htm to fill in the
image.
Hit F12 and look in the network tab to see.
I am developing a webapp with jquery mobile and in an html file I have a data-rel attribute of a link set to "dialog". Data-transition is set to "fade". The problem is, that after clicking a button which is linking to another html file Chrome says "Error loading page". I found the solution for that and adding rel="external" does the job, but it destroys my "fade" transition. Firefox seems not to have this strange behaviour and links me to the desired page without having rel="external", so the transition works. I could stay with Firefox, but I'd like to test my app on different browsers. Any suggestions? Many thanks in advance!
if it is an external link then just put rel="external".I hope it would work.
Home</li>