davidrichardson
asked on
Dreamweaver & Inline Frame
I am new to Dreamwever and I was trying to add an Inline frame to my page to view an external site within my page, is this possible?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I cant believe I was looking for a complied answer thanks for that Aplimedia, judsonmusic could you explain abit more I cant seem to get it to work.
Are you talking about the scroll part?
ASKER
yes
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the example, but i cant get it to resize?
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>
<body>
<script type="text/javascript">
//Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:(you should only need one unless you are using more than one iframe on a page)
//Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:
var iframeids=["wf_cnt"]
//Should script hide iframe from browsers that don't support this script (non IE5+/NS6+ browsers. Recommended):
var iframehide="yes"
var getFFVersion=navigator.use rAgent.sub string(nav igator.use rAgent.ind exOf("Fire fox")).spl it("/")[1]
var FFextraHeight=parseFloat(g etFFVersio n)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers
function resizeCaller() {
var dyniframe=new Array()
for (i=0; i<iframeids.length; i++){
if (document.getElementById)
resizeIframe(iframeids[i])
//reveal iframe for lower end browsers? (see var above):
if ((document.all || document.getElementById) && iframehide=="no"){
var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(if rameids[i] )
tempobj.style.display="blo ck"
}
}
}
function resizeIframe(frameid){
var currentfr=document.getElem entById(fr ameid)
if (currentfr && !window.opera){
currentfr.style.display="b lock"
if (currentfr.contentDocument && currentfr.contentDocument. body.offse tHeight) //ns6 syntax
currentfr.height = currentfr.contentDocument. body.offse tHeight+FF extraHeigh t;
else if (currentfr.Document && currentfr.Document.body.sc rollHeight ) //ie5+ syntax
currentfr.height = currentfr.Document.body.sc rollHeight ;
if (currentfr.addEventListene r)
currentfr.addEventListener ("load", readjustIframe, false)
else if (currentfr.attachEvent){
currentfr.detachEvent("onl oad", readjustIframe) // Bug fix line
currentfr.attachEvent("onl oad", readjustIframe)
}
}
}
function readjustIframe(loadevt) {
var crossevt=(window.event)? event : loadevt
var iframeroot=(crossevt.curre ntTarget)? crossevt.currentTarget : crossevt.srcElement
if (iframeroot)
resizeIframe(iframeroot.id );
}
function loadintoIframe(iframeid, url){
if (document.getElementById)
document.getElementById(if rameid).sr c=url
}
if (window.addEventListener)
window.addEventListener("l oad", resizeCaller, false)
else if (window.attachEvent)
window.attachEvent("onload ", resizeCaller)
else
window.onload=resizeCaller
</script>
<iframe name="wf_cnt" width="1005" height="366" src="https://www.experts-exchange.com/questions/22057219/Dreamweaver-Inline-Frame.html#17925849">
Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>
<body>
<script type="text/javascript">
//Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:(you should only need one unless you are using more than one iframe on a page)
//Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:
var iframeids=["wf_cnt"]
//Should script hide iframe from browsers that don't support this script (non IE5+/NS6+ browsers. Recommended):
var iframehide="yes"
var getFFVersion=navigator.use
var FFextraHeight=parseFloat(g
function resizeCaller() {
var dyniframe=new Array()
for (i=0; i<iframeids.length; i++){
if (document.getElementById)
resizeIframe(iframeids[i])
//reveal iframe for lower end browsers? (see var above):
if ((document.all || document.getElementById) && iframehide=="no"){
var tempobj=document.all? document.all[iframeids[i]]
tempobj.style.display="blo
}
}
}
function resizeIframe(frameid){
var currentfr=document.getElem
if (currentfr && !window.opera){
currentfr.style.display="b
if (currentfr.contentDocument
currentfr.height = currentfr.contentDocument.
else if (currentfr.Document && currentfr.Document.body.sc
currentfr.height = currentfr.Document.body.sc
if (currentfr.addEventListene
currentfr.addEventListener
else if (currentfr.attachEvent){
currentfr.detachEvent("onl
currentfr.attachEvent("onl
}
}
}
function readjustIframe(loadevt) {
var crossevt=(window.event)? event : loadevt
var iframeroot=(crossevt.curre
if (iframeroot)
resizeIframe(iframeroot.id
}
function loadintoIframe(iframeid, url){
if (document.getElementById)
document.getElementById(if
}
if (window.addEventListener)
window.addEventListener("l
else if (window.attachEvent)
window.attachEvent("onload
else
window.onload=resizeCaller
</script>
<iframe name="wf_cnt" width="1005" height="366" src="https://www.experts-exchange.com/questions/22057219/Dreamweaver-Inline-Frame.html#17925849">
Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe>
</body>
</html>
ASKER
judsonmusic i have had a better look at it this morning it wont resise on external sites is there a way around it? (The site is a promotional page from one of our suppliers)
i dont think, but let me research it and Ill get back to you.
you may look at using a scroll on the iframe for that .
you may look at using a scroll on the iframe for that .
I object.... the question was answered.
Aplimedia
Aplimedia
The question was answered well
ASKER
Sorry i should of closed earlyer, i have increased the points and split, aplimedia answered the original question and judsonmusic gave me aditional guidance
Thanks again
Thanks again
use this in all of the pages that the iframe will point to.
<body onload="window.parent.scro
this will make your parent page always scroll to the top so that your links and header are always there.