[Javascript] Frame

Yi Li yili1998 at yahoo.com
Fri Mar 23 15:46:33 CST 2001


Thanks, Jon, after formatted codes, same problem stays
there. Not too bad in IE, no good in NN(logo right on
bottom of the frame edge), anyway, the logo is not
V-centered in frame, I put marginwidth="0"
marginheight="0" in this frame also. here is the code.
---------------------nav.html--------------------------
<html>
<head>
<title>nav page</title>
<SCRIPT LANGUAGE="JavaScript">
<!--
if (document.images)
 {
    homeoff = new Image();  
    homeoff.src = "home.gif";    
    homeon = new Image();    
    homeon.src = "homeRO.gif";    

    aboutusoff = new Image();  
    aboutusoff.src = "about.gif";    
    aboutuson = new Image();    
    aboutuson.src = "aboutRO.gif";    

    servicesoff = new Image();  
    servicesoff.src = "services.gif";    
    serviceson = new Image();    
    serviceson.src = "servicesRO.gif"; 
 
    clientsoff = new Image();  
    clientsoff.src = "clients.gif";    
    clientson = new Image();    
    clientson.src = "clientsRO.gif"; 

    orderoff = new Image();  
    orderoff.src = "order.gif";    
    orderon = new Image();    
    orderon.src = "orderRO.gif"; 
 }

 function On(imageName)
  {
   if (document.images)
    {
      document[imageName].src =
eval(imageName+"on.src");
    }
  }
 function Off(imageName)
  {
   if (document.images)
    {
      document[imageName].src =
eval(imageName+"off.src");
    }
  }

 //-->
</SCRIPT>
</head>

<body background="back.gif" leftmargin="0"
topmargin="0" marginwidth="0" marginheight="0">
<table border="0" cellspacing="5" cellpadding="0"
align="left" valign="top">
<TR>  
  <TD ><IMG SRC="logo2.gif" border="0" height="59"
width="117" Valign="top"></TD>

 
<TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  <TD><A HREF="home.html" target="frame3" onmouseover
= "On('home')" onmouseout = "Off('home')">
      <IMG SRC="home.gif" NAME="home" BORDER="0"
alt="Home Page"></A>
  </TD>
  <TD><A HREF="aboutus.html" target="frame3"
onmouseover = "On('aboutus')" onmouseout =
"Off('aboutus')">
      <IMG SRC="about.gif" NAME="aboutus" BORDER="0"
alt="About us"></A>
  </TD>
  <TD><A HREF="services.html" target="frame3"
onmouseover = "On('services')" onmouseout =
"Off('services')">
      <IMG SRC="services.gif" NAME="services"
BORDER="0" alt="Services"></A>
  </TD>
  <TD><A HREF="clients.html" target="frame3"
onmouseover = "On('clients')" onmouseout =
"Off('clients')">
      <IMG SRC="clients.gif" NAME="clients" BORDER="0"
alt="Clients"></A>
  </TD> 
  <TD><A HREF="order.html" target="frame3" onmouseover
= "On('order')" onmouseout = "Off('order')">
      <IMG SRC="order.gif" NAME="order" BORDER="0"
alt="Order Information"></A>
  </TD>  
</TR>
</table>
</body>
</html>
------------------END----------------------------



--- Jon Taylor <jon at olive.co.uk> wrote:
> Not sure this was a javascript problem, anyhoo...
> 
> Make sure you have the margin set in every relevant
> frame tag in your
> frameset, eg...
> 
> 
> <FRAMESET ROWS="60,*" BORDER="0" FRAMEBORDER="NO"
> SCROLLING="NO" NORESIZE>
>     <FRAME SRC="nav.html" NAME="frame1"
> SCROLLING="NO" marginwidth="0" marginheight="0">
>     <FRAMESET COLS="30%,*" BORDER="0"
> marginwidth="0" marginheight="0"
> NORESIZE>
>         <FRAME SRC="left.html" NAME="frame2"
> MARGINHEIGHT="5" MARGINWIDTH="10" NORESIZE>
>         <FRAME SRC="main.html" NAME="frame3"
> marginwidth="0"
> marginheight="0"NORESIZE>
>     </FRAMESET>
> </FRAMESET>
> 
> As far as I know it doesn't have an effect in the
> frameset tag.
> 
> Also check your body tag has margins set...
> 
> <body leftmargin="0" topmargin="0" marginwidth="0"
> marginheight="0">
> 
> If your still having trouble I/we'd need to se the
> html of the table your
> using to control layout.
> 
> HTH
> Jon
> 
> 
> __________________________________
> 
> Jon Taylor
> 
> 
> 
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> http://www.LaTech.edu/mailman/listinfo/javascript


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/




More information about the Javascript mailing list