Link to home
Start Free TrialLog in
Avatar of davidrichardson
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
Avatar of aplimedia
aplimedia
Flag of Spain image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
you can use iframe but also want to use a scroll parent command just incase you are using an iframe to go between pages that are bigger than the paged in the iframe!

use this in all of the pages that the iframe will point to.

<body onload="window.parent.scroll (0,0)">

this will make your parent page always scroll to the top so that your links and header are always there.
Avatar of davidrichardson
davidrichardson

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?


yes
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]

var FFextraHeight=parseFloat(getFFVersion)>=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(iframeids[i])

tempobj.style.display="block"

}

}

}

 

function resizeIframe(frameid){

var currentfr=document.getElementById(frameid)

if (currentfr && !window.opera){

currentfr.style.display="block"

if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax

currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight;

else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax

currentfr.height = currentfr.Document.body.scrollHeight;

if (currentfr.addEventListener)

currentfr.addEventListener("load", readjustIframe, false)

else if (currentfr.attachEvent){

currentfr.detachEvent("onload", readjustIframe) // Bug fix line

currentfr.attachEvent("onload", readjustIframe)

}

}

}

 

function readjustIframe(loadevt) {

var crossevt=(window.event)? event : loadevt

var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement

if (iframeroot)

resizeIframe(iframeroot.id);

}

 

function loadintoIframe(iframeid, url){

if (document.getElementById)

document.getElementById(iframeid).src=url

}

 

if (window.addEventListener)

window.addEventListener("load", 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>
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 .
I object.... the question was answered.

Aplimedia
The question was answered well
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