I am trying to display another page (external webpage) on my drupal page. My approach is to embed the page in an iframe as follows:
<iframe frameborder="1" height="100" scrolling="auto" src="http://mywebpage.com/specific_page" width="80%"></iframe>
So far I only see the iframe box but the content is not showing up. I've switched between Full HTML, Filtered HTML and Full HTML with IMCE but none worked. I also tried a couple different options from google search but no. Your help is sought pls. Thanks
Fastest solution i think would be using PHP filter module which gives you ability to use custom code without filtration as Filtered and Full HTML filter do.
If you are only one who can add code with PHP filter(do not give this possibility to other users!) you can go straight forward with this approach.
Hope it will fit for you.
Related
I am using iframe tag as below on my structure and template with webcontent, our business requirement is if video is not available on given link show alter image instead, I thought it should be easy and but after googling on it did not see any better way so thought let me ask here... any idea ?
here is my code looks like
<iframe src="${.vars['Embed_Link'].getData()}" width="640" height="360" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
Btw this is Liferay 6.2 EE
there is no alt image in an iframe. An iframe just shows whatever it finds under the URL that you provide to it, indiscriminately.
To mimic something like this: If the website (with the video) that you embed is under your control, you can determine what to show in case no video is available. Currently it might show a 404 error message, a search for related content, an ad, nothing at all.
Another way to mimic is: Find out if the server delivers 404 if a video is not available, then determine (using an Ajax-request) if you'll get 404 or 200 as response code. And only if you get 200, render the iframe, otherwise render your alternative image.
In general, this is quite unrelated to Liferay, and with this hints you might find some code in the regular web development circles
(newbie=me) On my wordpress website I have video1 and I want to put it in two places on the website because it makes sense from a users perspective.
Video1 is embeded using html5; its and seo embed from Wistia. I want to put copy_video1 on a different page with text that is also different and useful. The thumbnail/frame-of-video used for copy_video1 is different than video1 making it more relevant to its page.
I thought I would use an iframe for copy_video1 since I had read google doesn't index iframes?. I thought to go the extra mile and use best practices that I should use canonical in the iframe to point to video1. Is this correct? What does the syntax look like for an iframe and video with canonical in it?
Is this the same method I would use for the video if an external site wanted to embed my video?
I guess this is also and seo question, but mostly to code it correctly for indexing.
THis is for a small non-profit site...
Thanks for you help!
I cannot think of many instances where you would have to duplicate a video on the same website, so my recommendation is to just have one and use HTML5's poster attribute. You would just set it to a different image on the other page. This should work, should replace your first line of the :
<video controls poster="/images/othervideo1.jpg">
I'm trying to display several pages (ex.: google.com, yahoo.com ...) on one page. I'm pulling the html of those pages using cURL multi, and then showing all the results on one page for me to see. The problem is that the first page's css messes up all the lower page's css.
Ex.: Yahoo is the first page and has a pretty diverse CSS styling, the next is MSN, which overrides most CSS, but not all of it, and it looks weird.
Any solutions? Thanks
As much as I hate it, but using iFrames is perhaps the quickest way you can do this.
The better option is the harder one where you would add prefix in your styles or classes in the ones that don't have.
So if the first site defines H1 and then the second site defines H1 differently, you would do H1.firstsite and then H1.secondsite, etc and then in the HTML add class to all H1 tag's.
To be on the safe side, do the similar manipulation to all classes/Ids as well, that way there is no chance of conflict.
PS: Some content may not be shown in an iframe.
you have to use this..
<iframe src="http://www.google.com" width="600px" frameborder="0px"></iframe>
<iframe src="http://www.yahoo.com" width="600px" frameborder="0px"></iframe>
<iframe src="http://www.bin.com" width="600px" frameborder="0px"></iframe>
I suggest using iFrames to load separate pages (or a single page with different query strings) where the content retrieved with cURL. Basically split the cURL operations and access them with iFrames.
That's the simplest and most straight-forward way I see, with least amount of changes to the work you have already done.
I'm developing a website and I decided to use Facebook comments to provide commentable behaviour. But, unfortunately, I met some problems.
While trying to customize look of news page, ex. http://buchman.pcspace.pl/aktualnosci/ept-snowfest-podsumowanie-czwartego-dnia.html, I am not able to apply CSS to view: everything appears correctly in HTML source, but doesn't change view.
What's wrong?
According to this blog post the new fb:comments no longer supports custom CSS.
After log research I noticed that while loading fb frame, it doesn't use css given as param.
It causes all parts don't work..
I want to embed an .asp page on an html page. I cannot use an iframe. I tried:
<object width="100%" height="1500" type="text/html" data="url.asp">
alt : url
</object>"
works great in ff but not ie7. Any ideas? Is it possible to use the object tag to embed .asp pages for IE or does it only work in ff?
I've solved it in the past using Javascript and XMLHttp. It can get a bit hacky depending on the circumstances. In particular, you have to watch out for the inner page failing and how it affects/downgrades the outer one (hopefully you can keep it downgrading elegantly).
Search for XMLHttp (or check this great tutorial) and request the "child" page from the outer one, rendering the HTML you need. Preferably you can get just the specific data you need and process it in Javascript.
You might be able to fake it using javascript. You could either use AJAX to load the page, then insert the HTML, or load "url.asp" in a hidden iframe and copy the HTML from there.
One downside (or maybe this is what you want) is that the pages aren't completely independent, so CSS rules from the outer page will affect the embedded page.
Well, after searching around and testing I don't think it is possible. It looks to me like IE does not allow the object tag access to a resource that is not on the same domain as the parent. It would have worked for me if the content I was trying to pull in was on same domain but it wasn't. If anyone could confirm my interpretation of this it would be appreciated.