{embed} vs {pi_iframe}
Posted: Tue Jun 19, 2007 7:37 am
For a site i'm building I had to include another application with links included. I tried using "include", but that didn't hold the links as being relative to the included page, I then checked {embed} and {pi_iframe}.
Both worked, but with different issues being left, {embed} requires javascript and more importantly "kills xhtml validation", {pi_iframe} doesn't require javascript, but left a scrollbar for vertical scrolling, even thoug it wasn't required.
I then looked at the source of {pi_iframe} and changed the logic (found some logic in another post) to the code below:
""
This solved my issues as I didn't want scrollbars if they weren't needed, it validates and all relative links are shown in the same area, as it is an IFRAME.
I have set the height to be fixed through the CSS, as the scripts can't check the height on external pages (security reason), so my CSS is like:
One other small remark, make sure you'll never put around the calling of {pi_iframe} as it kills validation of xhtml.
Ronny
Both worked, but with different issues being left, {embed} requires javascript and more importantly "kills xhtml validation", {pi_iframe} doesn't require javascript, but left a scrollbar for vertical scrolling, even thoug it wasn't required.
I then looked at the source of {pi_iframe} and changed the logic (found some logic in another post) to the code below:
""
This solved my issues as I didn't want scrollbars if they weren't needed, it validates and all relative links are shown in the same area, as it is an IFRAME.
I have set the height to be fixed through the CSS, as the scripts can't check the height on external pages (security reason), so my CSS is like:
Code: Select all
#myframe {
height: 830px;
width: 99%;
}
Ronny