Can someone explain why iframe works in Firefox but does not work in Internet Explorer.
I'm trying to iframe www.craigslist.org with no luck.
why not use a <div> then set the innerHTML to CONTENTS OF craiglist.org?
Check headers returned by the site and you'll see the site simply refuses rendering inside of IFrames on other sites. Probably version of Firefox you are using does not support the header or more likely site's format of the header incorrectly makes it ignored by Firefox.
X-Frame-Options: Allow-From https://forums.craigslist.org
Info - X-Frame-Options
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head> <title>Craigslist Frame</title>
<base href="http://craiglist.org" />
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<div>
<?php
$url = "http://www.craiglist.org/";
$string= file_get_contents($url);
echo $string;
?>
</div>
</body>
</html>
Try this out :-)
Related
I've started coding html in wordpress. I have a html code with label tag and an input tag of type "text". The input field is not getting displayed in browser. The same code works fine in eclipse. What might be the problem. When I save the post as draft the tag disappears. Not able to solve the issue. Kindly help me in this regard.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Hello testing</title>
</head>
<body>
<div> <label> Name:</label> <input type="text"> </div>
</body>
</html>
Above image is the code run through eclipse
Above one is the image run through wordpress preview
when writing html in the Wordpress editor, you can only use tags that are allowed by Wordpress. Dont think the input tag is one if them.
Look at this:
https://en.support.wordpress.com/code/#html-tags
The "input" tag is not supported by WordPress editor.
I used next HTML code as page, but Chrome just downloaded this page as file, not browsed as hypertext instead.
Address used: http://127.0.0.1:5151/
What's wrong with it?
<!DOCTYPE html>
<html lang="en" xmlns="">
<head>
<meta charset="UTF-8">
<title>Greeting</title>
</head>
<body>
<h3>Greetings!</h3>
Welcome to the Web Interface.<br/>
<br/>
What action are you want to do?<br/>
<br/>
1. Upload config<br/>
</body>
</html>
Headers used Content-Type: application/xhtml
Check if the file extension is .html instead of .hmlt or something else
I have these strange image urls that if I call direct in browser, an image shows up but when I use it in an img tag no image shows up.
http://thetvdb.com/banners/_cache/fanart/original/248951-1.jpg
I'm sure I'm making some silly mistake. Here is simple code.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org
/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title></title>
</head>
<body>
<img src="http://thetvdb.com/banners/_cache/fanart/original/248951-1.jpg" alt=""/>
</body>
</html>
Any help?
The TV DB does not want to use their bandwidth to display an image on your site.
We don't allow any kind of hotlinking, you are only allowed to directly download the images and then use them as you see fit, you may not use us as a host.
They have taken steps to prevent you from doing this.
quentin#laptop:~ # curl -e http://example.com/ http://thetvdb.com/banners/_cache/fanart/original/248951-1.jpg
<html>
<head><title>403 Forbidden</title></head>
<body bgcolor="white">
<center><h1>403 Forbidden</h1></center>
<hr><center>nginx</center>
</body>
</html>
I need web page to redirect via HTML meta and open that page in a new window. How can I do that?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Photo Gallery Redirect</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Refresh" content="0; url=http://google.com">
</head>
<body>
</body>
</html>
You can do this! It is particularly useful when the refresh is being run in an iframe (such as a Facebook app canvas page), and you want the refresh to load the content to the main (parent) window.
Use the following Javascript in your meta-redirect:
<meta http-equiv="refresh" content="5; URL=javascript:window.open('http://google.com','_parent');">
You can't do that with a meta redirect. Grab JavaScript.
<script type="text/javascript">window.open('http://google.com');</script>
Either that, or add target="_blank" to the originating link/form which landed in this "Photo Gallery Redirect" page.
click here
or
<form action="http://google.com" target="_blank">
<input type="submit" />
</form>
Not XHTML/HTML5 valid, but it works. Else you can just add rel="ext" and use some piece of Javascript to silently put the target="_blank" in anyway.
You can't. You need to use javascript on a timer to open a popup (which most likely will be blocked by some browsers as an unrequested popup window)
You are probably better off taking a different approach to your problem.
make it without using url attribute just like this
<meta http-equiv="refresh" content="5;https://stackoverflow.com">
I am using DreamWeaver to code xHtml docs. in the program the code is valid but when I upload it in the inspect element I see double <head> tags and when I right-click to see the source file it seems o.k.
Is it because I'm using dreamweaver? what can be wrong?
the first error is : "Extra <html> encountered. Migrating attributes back to the original <html> element and ignoring the tag." - in line 3
The code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="the content of my doc" />
<meta name="description" content="this is an example document" />
<link rel="alternate" type="application/rss+xml" title="rss feeds" href="linkto/xml/feeds.xml" />
<!-- scripts -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<title>The Title</title>
</head>
<body>
<!-- content -->
</body>
</html>
Thank you very much.
No problem in Chromium 5.0.307.9 (Developer Build 39052) under Linux. I can't test it in Safari now.
EDIT: Proposed test case had nothing to do with this problem, neither could see any extra <head> tags. However, I looked at the Developer Tools of Safari and Chrome under Windows and Firebug in Firefox and all three rendered the DOM incorrectly. Just have a look at this picture and see that the first <link> tag has jumped into the body.
This problem also has nothing to do with Javascript because when turning off Javascript the result is the same, even more clear when comparing with the source code. Strange I didn't notice this under Linux.
The Developer Tools of the WebKit browsers give an even clearer picture (also notice the jQuery error message). I suspect the Unicode Byte-Order Mark (BOM) at the beginning of the file causing the problem: as you can see the BOM is moved to the <body> of the document, perhaps dragging several elements in the <head> with it. But also the unclosed <link> elements, as shown by the W3C validator, might give some issues, although browsers usually handle this without any problems. First get rid of the BOM in your file and see if the problem persists.
And I see another error: those tags beginning with <meta ... are called meta tags, not "meat tags". ;-)
You should have a title element what you write between
the <title></title> tags will been displayed in top bar of your browser
Just make sure your
</head>
tag has the slash in the actual file you're working on. That's an easy typo.
To remove BOM from your document, you can use this php function:
function removeBOM($str=""){
if(substr($str, 0,3) == pack("CCC",0xef,0xbb,0xbf)) {
$str=substr($str, 3);
}
return $str;}