Link to home
Start Free TrialLog in
Avatar of pwdavismd
pwdavismd

asked on

iframe in ie cut off in php and html pages

view the problem here http://koamrealty.com/eng_pages/eng_business.shtml

iframe is cut off in IE only. Looks great in firefox and opera. Another issue is we dont' want scrolling but want the html page to automatically extend down i.e. expand the table cell. Thanks.

Code is:
html page
<iframe src="../koam_bb_kor/board.php?Language=KOR&DB_Name=BUS" width="549" frameborder="0" marginheight="1px" marginwidth="1px" scrolling="no" height="706"></iframe>

php page
<head>
<link rel="stylesheet" type="text/css" href="../Koam_style.css">
<script language="JavaScript">
 function resize() {
  var iframe = document.all.stretch;
   iframe.height=document.frames("stretch").document.body.scrollHeight;
  }
</script>

<script type="text/javascript">
<!--
function popup(mylink, windowname)
{
      if (! window.focus)return true;
      var href;
      if(typeof(mylink) == 'string')
            href=mylink;
      else
            href=mylink.href;
      window.open(href, windowname, 'width=400, height=200, scrollbars=no');
      return false;
}
//-->
</script>
</head>
<body link="#000000" vlink="#000000" alink="#000000">
<div class="bb_text">
<?php
      $Language = $_GET["Language"];
      $DB_Name = $_GET["DB_Name"];
      $Table = $Language . _ . $DB_Name;

      if (is_Null($Language)){
            $Table = ENG_BUS;
            $Language = ENG;
            $DB_Name = BUS;
      }

      if (is_Null($DB_Name)){
            $Table = ENG_BUS;
            $DB_Name = BUS;
            $Language = ENG;
      }

      $TableRepl = $Table . _ . "Reply";


      $link = mysql_connect('localhost','schoi', 'KoamAdmin');

      if(!$link){
            die('Could not connect: ' . mysql_error());
      }

      mysql_select_db("Koam_DB") or die ('Could not select database');
?>
      <table align = "left" valign="top" border = "0" width = "549" cellspacing = "1" cellpadding = "0">
            <tr bgcolor = #333333 height = 19>
                  <!--/* <b><td align = "center" valign = "middle" width = 110><span class="body_text"><font color = #ffffff> DATE </font></span></td></b> */ -->
                  <b><td align = "center" valign = "middle" width = 375><span class="body_text"><font color = #ffffff> TITLE </font></span></td></b>
                  <b><td align = "center" valign = "middle" width = 64><span class="body_text"><font color = #ffffff>REPLIES </font></span></td></b>
            </tr>
<?php
      $SearchThis = $_GET["SearchThis"];
      $SearchBy = $_GET["SearchBy"];
      $ColorVar = 1;
      $ShowEntry = $_GET["Entry"];
      $ShowReply = $_GET["Reply"];

      if(!is_null($SearchThis)){
            $query = "SELECT * FROM $Table WHERE $SearchBy LIKE \"%$SearchThis%\" ORDER BY Entry_ID DESC;";
      }
      else{
            $query = "SELECT * FROM $Table ORDER BY Entry_ID DESC;";
      }

      if(is_null($ShowEntry)){
            $ShowEntry = 0;
      }

      if(is_null($ShowReply)){
            $ShowReply = false;
      }

      $Entries = mysql_query($query) or die('Query failed: ' . mysql_error());

      $NumRows = mysql_num_rows($Entries);

      while($line = mysql_fetch_array($Entries, MYSQL_ASSOC)){
            $ColorVar = $ColorVar + 1;
            $Color = ACACAC;
            $EntryID = $line["Entry_ID"];

            if($ColorVar % 2 == 0){
                  $Color = ACACAC;
            }else{
                  $Color = CCCCCC;
            }

            echo "\t\t<tr bgcolor = #$Color align = \"center\" height = 19 colspan=2 class=\"body_text\"><b>\n";
            /* echo "\t\t\t<td><font color=\"#000000\">";

            echo date("m.d.Y", strtotime($line["Created_DT"]));

            echo "</font></td>\n"; */

            echo "\t\t\t<td align=\"left\">";
                                           echo "<table align = \"left\" valign=\"top\" border = 0 width = 355 cellspacing = 0 cellpadding = 0>";
                                           echo "<tr bgcolor=#$Color height=19 class=\"body_text\">";
                                           echo "<td><font color=\"#000000\">";
            echo "<a style=\"text-decoration:none\" href = \"board.php?Entry=$EntryID&Language=$Language&DB_Name=$DB_Name\">";
            echo $line["Title"];
            echo "</a></td></tr></table>";
                                           echo "</td>\n";

            echo "\t\t\t<td align = \"center\"><font color=\"#000000\">";
            $Replies = mysql_query("SELECT COUNT(*) AS NumReplies FROM $TableRepl WHERE Parent_ID = $EntryID") or die('Query failed: ' . mysql_error());
            $tmp = mysql_fetch_array($Replies, MYSQL_ASSOC);

            $NumReplies = $tmp["NumReplies"];
            if($NumReplies != 0){
                  echo "<a style=\"text-decoration:none\" href = \"board.php?Entry=$EntryID&Reply=true&Language=$Language&DB_Name=$DB_Name\">";
            }
            echo $NumReplies;
            if($NumReplies != 0){
                  echo "</a>";
            }
            echo "</font></td>";
            echo "\t\t</b></tr>\n";

            if ($ShowEntry != 0 && $EntryID == $ShowEntry){
                  echo "<tr bgcolor = #$Color align = \"left\" height = 19 class=\"body_text\" charoff=5>";
                  /* echo "<td align = \"right\"><font color=\"#000000\"><b>Content:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></font></td>"; */
                  echo "<td colspan = 2><span class=\"bb_body_text\"><font color=\"#000000\">";
                                                                echo "<table align = \"left\" valign=\"top\" border = 0 width = 439 cellspacing = 0 cellpadding = 0>";
                                                                echo "<tr bgcolor=#$Color height=19 class=\"body_text\">";
                                                                echo "<td width=6%>&nbsp;</td><td width=94%><font color=\"#000000\">";
                  $Content = $line["Entry"];
                  echo $Content;
                  echo '<br><br>';
                                                                echo "</font>";
                  echo "<a href=\"WriteReply.php?ParentID=$EntryID&Table=$Table&Language=$Language&DB_Name=$DB_Name\" onClick=\"return popup(this, 'notes')\">REPLY</a>";
                  echo "<br><br>";
                  echo "</font></span></td></tr></table></td></tr>";
            }
            if ($ShowReply == true && $ShowEntry == $EntryID){
                  $Replies = mysql_query("SELECT * FROM $TableRepl WHERE Parent_ID = $EntryID ORDER BY Reply_ID") or die('Query failed: ' . mysql_error());

                  while($ReplLine = mysql_fetch_array($Replies, MYSQL_ASSOC)){
                                echo "<tr bgcolor = #$Color align = \"left\" height = 19 class=\"body_text\">";
                        echo "<td align = \"right\"><font color=\"#000000\"><b>Re:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></font></td>";
                        echo "<td colspan = 2><font color=\"#000000\">";
                                                                                     echo "<table align = \"left\" valign=\"top\" border = 0 width = 439 cellspacing = 0 cellpadding = 0>";
                                                                                     echo "<tr bgcolor=#$Color height=19 class=\"body_text\">";
                                                                                     echo "<td width=6%>&nbsp;</td><td width=94%><font color=\"#000000\">";
                        echo $ReplLine["Reply"];
                        echo "</font></font></td></tr></table></td></tr>";
                  }
            }
      }

      mysql_close($link);

      echo '

      <form name="Search" action="board.php" method="get">
<tr bgcolor=#ffffff align="center" valign="middle" class="bb_text">
<!--<td width = 110>

      
</td> -->
<td width = 390><table width="350" border="0" cellspacing="0" cellpadding="2">
  <tr>
    <td><select name="SearchBy">
      <option value="Title"><span class="body_text">TITLE</span>
      <option value="Entry"><span class="body_text">CONTENT &nbsp; &nbsp;</span>
      </select>&nbsp;</td>
    <td><input type="text" name="SearchThis" size="55%">&nbsp;</td>
  </tr>
</table>

      
</td>
<td width = 80>
      <input type="submit" value="SEARCH" style>
</td>
</tr>


      ';

      echo "
        <tr><td>
      <input type=\"hidden\" name=\"Language\" value=$Language>
      <input type=\"hidden\" name=\"DB_Name\" value = $DB_Name> </td></tr>
</table>
      </form>
      ";
?>
</div>
</body>
Avatar of Khanh Doan
Khanh Doan
Flag of United States of America image

I think you should resize your table and enable scrolling, because when i click in CLEANER or smth else, frame's height isn't enought.
Bonmat86.
ASKER CERTIFIED SOLUTION
Avatar of Giovanni G
Giovanni G
Flag of Italy 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
Avatar of pwdavismd
pwdavismd

ASKER

php include is a good idea but the page is also using ssi  so changing the extension breaks the ssi stuff which I don't really want to recode
the real issue is with board.php which has not been addressed. It's too wide and I don't understand why