Trouble using chrome frame - html

I detect if a user has chrome frame by placing this in teh body of my page:
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js"> </script>
<div id="placeholder"></div>
<script>
CFInstall.check({
node: "placeholder",
destination: "http://www.waikiki.com"
});
</script>
In the header of my boilerplate page I have:
<meta http-equiv="X-UA-Compatible" content="chrome=1">
I managed to get the site to prompt me to install chrome frame, which I did, but the page still renders with IE errors, any ideas why?
Using IE7.

You can tell if the page is using chrome frame by right clicking on the page. If the context menu lists "About Chrome Frame.." it's rendering the page via chrome frame plugin.
Also you need to call CFInstall.check after the body is loaded.

Related

Twitter timeline is not loading

The twitter timeline is not shown properly in the web browser even though it is the original code from the twitter publish website.
At first the timeline was shown as it should. Somehow after I refreshed the site with F5 it didn't work at all. Somehow at the X time I refreshed it worked. When I restarted my computer and wanted to work on the file again it didn't work. I'm not an expert on HTML but I think the problem may be in the script tag.
I looked up other questions here on stackoverflow but none of them helped me. My code had no problems before I tried out without the timeline.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>test</title>
</head>
<body>
<a class="twitter-timeline" href="https://twitter.com/ErinCorleyGray/lists/stackers?ref_src=twsrc%5Etfw">A Twitter List by ErinCorleyGray</a>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
</body>
</html>
A timeline of the twitter list should be displayed instead I get only the text: "A twitter list by ..."
I just pasted your code onto a new html document and viewed it on my Chrome browser and I did not have an issue with viewing the timeline. I have attached a screenshot of what I see. Maybe it is a browser issue? screenshot of the top of the page

Auto refresh in Mac not working for some site

I got a code that refreshes the html page as per the seconds I desire. I am on an Mac and I use the TextEdit app to make the HTML file. This code works for www.apple.com but it does not work for say, https://www.bitcointalk.org or http://www.macrumors.com.
I am not sure why this is happening. All I am doing is replacing the apple URL with bitcointalk url. I know I can also do this refreshing via Safari extension, but I need this code to work.
Thanks a lot
The code I am using is:
<html>
<head>
<meta http-equiv="refresh" content="5">
</head>
<FRAMESET>
<FRAME src="http://www.apple.com/">;
</FRAMESET>
</html>
EDIT: What I am trying to do is, create this html and move it to my iPhone, so that I can do the web refresh through my phone. Right now there are only paid apps in the App store that lets you refresh a page automatically every few seconds/minute and they are not really that good.
As #esqew pointed out in their comment, the sites that aren't showing up forbid access via frames by setting the X-Frame-Options HTTP header to DENY or SAMEORIGIN.
See https://developer.mozilla.org/en-US/docs/Web/HTTP/X-Frame-Options

Loading whole web-page

I try to load a concrete web page with iframe:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body>
<iframe id="frame" src="http://www.euronics.ee/" frameBorder="0" width="1000px" height="700px"></iframe>
</body>
</html>
Why it cannot load whole page. It loads only body? It loads another pages well if i try.
If you check that sites code, you will see:
<script type="text/javascript">
//This block of javascript checks if the current page is opened in a popup IFrame
//and if this is true - closes popup and reloads parent window.
//We use Popup template for popup windows and only this template is accepted for popups. A window with any other template will be closed immidiately.
//This also solves the problem with redirecting to parent after user has logged in via Login popup. After loggin in user is redirected back to My Account page
//which in turn uses Audio template thus immidiately gets closed and parent gets reloaded.
if (self != top) {
$("body").empty(); //also clears body to avoid showing page content while the page is closing
parent.location.reload();
}
</script>
And that's why it won't load the site in your iframe I guess.
Not everyone likes the idea of their site to be shown on other sites in iframes. I would say that they just want real visitors.
When I try it in jsfiddle, I get the following console error:
Blocked a frame with origin "http://www.euronics.ee" from accessing a frame with origin "http://fiddle.jshell.net". Protocols, domains, and ports must match.
Could it be that the site you're loading has https requests?

IE9 displaying distorted version of website

This website displays fine in Chrome & Firefox, but displays as left-aligned in IE9, and the image gallery is skewed also.
I don't understand why IE9 would be showing such a different display.
A 3rd party web firm had altered the Opencart template to include a script element before the head element, which apparently puts IE into quirks mode.
Thanks to Frankie on CodingForums.com for fixing this for me.
His post:
By putting this before the doctype, you ordered IE into quirks mode:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
$.noConflict();
jQuery(document).ready(function() {
jQuery(".the-content").hide();
jQuery(".the-head").click(function() {
jQuery(this).next(".the-content").slideToggle(500);
});
});
</script>
<?xml version="1.0" encoding="UTF-8"?>
Put it inside the head. And you can delete the last line. You don't need that, and it sets off IE6.

Facebook Like Button not working in IE

I am having trouble getting consistent behaviour from my Facebook Like button. I have created this example which I believe to be the simplest possible implementation...
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<title>Untitled Page</title>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1" type="text/javascript"></script>
</head>
<body>
<fb:like href="http://www.stackoverflow.com" layout="button_count" show_faces="false" width="450" font=""></fb:like>
</body>
</html>
I have saved this as an HTML file which I am serving from a webserver running on my machine (localhost - I assume this won't be a problem as the page I'm 'liking' in this example is public-facing).
If I try this in Google Chrome, it appears to work without a problem.
When I try it in IE9, the like button renders, but when I click it, a new IE window opens which is mostly blank apart from a blue Facebook header. The URL of this page is: http://www.facebook.com/connect/connect_to_external_page_widget_loggedin.php?social_plugin=like&external_page_url=http%3A%2F%2Fwww.stackoverflow.com%2F
This is really confusing me as the example is about as simple as it gets! Any help would be really appreciated!
EDIT: A little more information. If I go to Facebook in IE9 and log-out, then try my like button again, a new window still opens but this time I can login. After logging in, though, I still get taken to the same blank page.
In desperation, I tried accessing my local page from http://127.0.0.1 instead of http://localhost
This appears to have solved (or at least worked around) the problem.
I would love to hear from anyone who can explain what this is all about!!