Redirect in html <object> - html

I'm using the <object> tag to display a website in my website (instead of <iframe>).
<object id="iframe" type="text/html" data="http://website.com"></object>
The problem is that if the website in the <object> redirects, my own website will be redirected.
I do not have this problem with <iframe>. Ideas?

Try this. It is working.
<object width="400" height="400" style="border:1px solid red;" data="http://php.net" type="application/html" archive="http://php.net">
example

Related

html <base> affecting Iframe "src" tag with external link

I have a base url <base href="https://www.example.com/" target="_self"> for my page's relative links.
The problem is, it's affecting the src="" of an external iframe am trying to embed.
​<iframe width="600" height="300" frameborder="0" src="​https://external-example.to/something/widget?width=600&height=300&note=​"></iframe>
Other iframes loading content from the my domain https://www.example.com/ are working just fine.
Forexample <iframe width="600" height="300" frameborder="0" src="​https://www.example.com/something/some-thing"></iframe> is not affected.
The base url if forcing it's value on the src value of the external iframe like this
​<iframe width="600" height="300" frameborder="0" src="​https://www.example.com/​https://external-example.to/something/widget?width=600&height=300&note=​"></iframe>
How can I avoid this https://www.example.com/​https://external-example.to/something/widget?width=600&height=300&note=​ from happening?
Thanks.

Iframe tag not showing content in html

I am attempting to have a website inside my website using the iframe tag like this:
<iframe height="100%" width="100%" src="http://www.example.com/">
<p>Your browser does not support the iframe element</p>
</iframe>
Unfortunately, this just shows a box or border. I would like it to show "example.com" inside my website.
Thanks in advance.
Works for me.
https://jsfiddle.net/1a7y6n37/
Tested with:
<iframe height="100%" width="100%" src="https://www.w3schools.com">
<p>Your browser does not support the iframe element</p>
</iframe>

Object HTML tag not working

I am trying to embed a PDF on a web page, but it isn't showing up. This is the code:
<object type="application/pdf" data="http://www.sunshinesam.com/v/vspfiles/downloadables/Father'sDayPrintable2015.pdf" height="600" width="400">Father's Day Printable 2015</object>
What do I need to change to make it work? Thanks!
A pure, non-javascript way to this would be to do exactly what you're doing now, but add a link. Some thing like
<object data="myfile.pdf" type="application/pdf" width="100%" height="100%">
<p>Alternative text - include a link to the PDF!</p>
</object>

Responsively embed webpage within webpage

I'm building a webapp designed for iDevices to be used in combination with the school website. I'd like to have one section of the webapp have an embedded clip of the school website. Typically I'd use something like this, and be done with it:
<object data=http://www.schoolwebsite.org width="600" height="400"> <embed src=http://www.schoolwebsite.org width="600" height="400"> </embed> Error: Embedded data could not be displayed. </object>
But that won't responsively, and account for rotation of an iPad or utilization of a different platform.
How would I edit that code, or create new code to embed an existing webpage within another webpage?
The tag you are looking for is iframe:
<iframe src = "http://www.example.com" />
This shows the webpage specified in the page that the code is in.
You can also customize it if you want, specifying the border in the style:
<iframe src = "http://www.example.com" style = "border: 1px solid" />
Replace 1px with the size of the border.
Also in the style tag, you can specify the size, or you can just specify the width: and height properties.
try an iframe:
<iframe src="http://www.schoolwebsite.org" style="border:1px black solid;" name="frame" scrolling="auto" frameborder="0" align="top" height="400px" width="600px">
</iframe>

Embed a Youtube Channel into HTML with iFrame

I'm trying to embed a Youtube channel into a HTML page.
For example I take this channel address: http://www.youtube.com/aaaa
I used this code:
<html>
<head>
</head>
<body>
<iframe src="http://www.youtube.com/aaaa"></iframe>
</body>
</html>
The problem is that it doesn't work. I tried with another site, and it works. What can be the problem?
The problem seems to be induced by this URL:http://www.youtube.com/aaaa.
I tried some other URLs and it works.
You can try some URLs easily here.
Try this:
<script src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/youtube.xml&up_channel=aaaa&synd=open&w=320&h=390&title=&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>
<iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/aaaa" frameborder="0">
</iframe>
This was taken from youtube here
it appears IE (and others) can only use [youtube.com /embed/ videoID] (HTML5 Player) - at least the way I am implementing them.
Try this:
<div name="iframe" style="width:100%; height:635px; border:2px solid grey; overflow:hidden">
<iframe src="http://yourchannel-URL" style="width:100%; height:700px; margin-top: -65px" scrolling="true">
If you can see this, your browser doesn't support iframes. Click here to see my YouTube channel.
</iframe>
</div>
This should embed a complete youtube channel without a youtube search bar.
To display a gallery of thumbnails of your YouTube Channel's most recent videos, you can use an iframe:
<iframe
onload="javascript:this.style.height = this.contentWindow.document.body.scrollHeight + 'px';"
scrolling="no"
height="600"
marginheight="0"
frameborder="0"
width="480"
src="http://youtubechannelembed.com/gallery.php?vids=9&user=doitfordummies&row=3&width=150&margin_right=15&desc=100&title=30&views=1&likes=1&dislikes=1&fav=1">
</iframe>