Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
ADOBE DREAMWEAVER: HomeDreamweaver ForumDreamweaver TutorialsFAQAdobe FlashWeb Design

Using IFrame in Dreamweaver

Cow Forums : Adobe Dreamweaver

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>
Using IFrame in Dreamweaver
by Wendi Epps on Apr 14, 2009 at 4:51:11 pm

We have a website that has many different pages of many differing heights. I need to set up page duplicates of existing pages so as to apply tracking to them and would like the duplicates to update automatically when I make changes to the master pages. I found an IFrame code that I'd like to implement. It worked fine until I ran into some pages that were very long, meaning the height set in the IFrame code was too small. When I made it larger, I found that it resized the whole page and any page that links to it. Meaning, that when I set the height to meet the current page height, and then I preview it in a browser window, click on one of the menu items on the side, that page opens with the same height as the previous one, and it is either too long with a ton of white space at the bottom or too short, cutting of part of the new page. Is there any way to make the IFrame dynamic, meaning that it resizes to the size of whatever page is opened? I've tried using this javascript code:

function getElement(aID)
{
return (document.getElementById) ?
document.getElementById(aID) :

document.all[aID];
}

function getIFrameDocument(aID){
var rv = null;
var frame=getElement(aID);
// if contentDocument exists, W3C

compliant (e.g. Mozilla)
if (frame.contentDocument)
rv = frame.contentDocument;
else // bad Internet Explorer ;)
rv = document.frames[aID].document;
return rv;
}

function adjustMyFrameHeight()
{
var frame = getElement

("myFrame");
var frameDoc = getIFrameDocument

("myFrame");
frame.height = frameDoc.body.offsetHeight;
}


I've also tried css, and I've tried using height="auto" and height="100%", none of which works. I don't know if it matters, but I am using Dreamweaver CS3. I'd really appreciate any help I can get!!

Wendi

Respond to this post   •   Return to posts index

Re: Using IFrame in Dreamweaver
by Richard Williams on Apr 14, 2009 at 8:04:12 pm

Hi Wendi

Can i make an alternative suggestion to you?

You can do everything you are stating here by applying a template or even a library asset to all your existing pages.

If you create a template, you can apply it to all pages really easily, then all you would ever have to do is open the one template file, make the changes, and then it will apply and update across the rest of the pages you have associated to them. This way you can track the pages more efficiently also as an iframe will not actually achieve tracking of the individual pages...

If this is an option you have already explored then fine, i am sure there is a way to do what you are wanting to do with the iframe, but just checking you have explored all avenues first

Regards




Richard Williams

Respond to this post   •   Return to posts index

Re: Using IFrame in Dreamweaver
by Wendi Epps on Apr 19, 2009 at 7:13:45 pm

The problem is that we have a large number of templates already, for different side and top nav bars and drop down menus. To do what we are trying to do using templates would be the same as making a duplicate of the existing pages, which is how we are doing it now. What we want to do here is duplicate existing pages for our marketing through various other websites so we can assign tracking id's to them. We occasionally make changes to the content, and right now when we change the content on a page, we have to go through and make the same changes on the duplicate pages that exist for tracking on the external websites.

Thanks for the suggestion, though!

Wendi

Wendi

Respond to this post   •   Return to posts index

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>


FORUMSTUTORIALSMAGAZINETRAININGVIDEOS - REELSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

© CreativeCOW.net All rights are reserved.

[Top]