dougalmaguire 0 Newbie Poster

I have an iframe that opens within another page. On the iframe there is a button that when clicked opens a region with a number of fields for the user to input.
What is meant to happen is that the region opens and the whole resizes so that the data that was being displayed is still visible and the new region is visible too.

This works ok on Firefox but in IE (7) the new region is opened but the data below is no longer visible because the resize has not worked.

This is the javascript being called that should resize the window.

  var currentfr = document.getElementById(frameid);
  var frameDivid = frameid.substr(2);
  var frameDiv = document.getElementById(frameDivid);
  var frameStr = "http://" +;
  var framePathName = location.pathname.substr(0,location.pathname.length-1);

  var ie8Null = frameStr + framePathName;
 // Hide the associated "top" link if frame is empty
  if (currentfr && !window.opera) {
    if (currentfr.src != location && currentfr.src != ie8Null && currentfr.src != '') { = "block";
      if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) { //ns6 syntax
        currentfr.height = currentfr.contentDocument.body.offsetHeight + this.FFextraHeight;
  // this is the IE bit !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     else if (currentfr.Document && currentfr.Document.body.scrollHeight) { //ie5+ syntax
        currentfr.height = currentfr.Document.body.scrollHeight + this.FFextraHeight;

      // Show containing frame (if it exists)
      if (frameDiv)
      { = "block";
    { = "none";

Anyone got an idea as to what I should have here to make IE work?