Solved

code wont work in netscape

Posted on 2002-05-22
4
264 Views
Last Modified: 2013-12-03
hi
this code wont work in netscape 4.04 and possibly other versions

thanks


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">


<html>
<head>
<title>AuthentikDigital.com - AS/A Level - GERMAN</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<STYLE TYPE="TEXT/CSS">
<!--
.text {font-family: Verdana; font-size: "75%"}
.textred {font-family: Verdana; font-size: "80%"; color: red}
.textlargered {font-family: Verdana; font-size: "200%"; color: red; text-decoration: underline}
.headline {font-family: Verdana; font-size: "100%"; font-weight: 900}
.textitalic {font-family: Verdana; font-size: "80%"; font-style: italic}
.textarthead {font-family: Verdana; font-size: "90%"; font-weight: 900; color: red}
.textsmall {font-family: Verdana; font-size: "60%"}
.textsmallred {font-family: Verdana; font-size: "60%"; color: red}
.textsmallblue {font-family: Verdana; font-size: "70%"; color: blue}
.textbold {font-family: Verdana; font-size: "80%"; font-weight: bold}
.textunder {font-family: Verdana; font-size: "80%"; text-decoration: underline}
.textboldunder {font-family: Verdana; font-size: "80%"; font-weight: bold; text-decoration: underline}
:link    { color: blue; text-decoration: underline}
:active  { color: blue; text-decoration: underline}
:visited { color: blue; text-decoration: underline}
:hover   { color: red; text-decoration: underline}
body { font-family: Verdana, sans-serif; background-color: #999966 }


-->
</STYLE>

</head>
<body>


<script language="javascript">
<!-- hide script from old browsers

//detect browser:
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
if (browserName == "Netscape" && browserVer >= 3) browserVer = "1";
else if (browserName == "Microsoft Internet Explorer" && browserVer == 4) browserVer = "1";
else browserVer = "2";


//preload images:
if (browserVer == 1) {
a1 = new Image(32,18);
a1.src = "../images/home1a.jpg";
a2 = new Image(32,18);
a2.src = "../images/home2a.jpg";
b1 = new Image(32,18);
b1.src = "../images/german2.jpg";
b2 = new Image(32,18);
b2.src = "../images/german1.jpg";
c1 = new Image(32,18);
c1.src = "../images/spanish2.jpg";
c2 = new Image(32,18);
c2.src = "../images/spanish1.jpg";
d1 = new Image(32,18);
d1.src = "../images/french2.jpg";
d2 = new Image(32,18);
d2.src = "../images/french1.jpg";
}

//image swapping function:
function hiLite(imgDocID, imgObjName, comment) {
if (browserVer == 1) {
document.images[imgDocID].src = eval(imgObjName + ".src");
window.status = comment; return true;
}}
//end hiding -->
</script>

<center>
<!--maintable-->

paul







<table bgcolor="#999966" bordercolor="#000000" cellspacing="0" cellpadding="0" border="0" width="800">
<tr><td colspan="7">





<!--logoandflags-->
<table width="100%" height="100%"><tr><td width="50%" bgcolor="#999966"><center>


<!--mainlogo-->
<table bgcolor="#FFFFFF" width="408" bordercolor="#000000" cellspacing="0" cellpadding="0" border="1">
<tr><td>
<img src="../images/authdigi.jpg"></center>
</td></tr></table>
<!--end mainlogo-->




</td><td width="50%" bgcolor="#999966">
<center>

<!--outsideflags-->
<table bgcolor="#FFFFFF" cellpadding="0" cellspacing="0" bordercolor="#000000" border="1" width="100%"><tr><td><center>

<!--flags-->
<table bgcolor="#FFFFFF" cellpadding="0" cellspacing="2"><tr><td width="25%" bgcolor="#FFFFFF"> <center>

<a href="index.asp?none" onMouseOver="hiLite('a','a2','HOME')" onMouseOut="hiLite('a','a1','')"><img name="a" src="../images/home1a.jpg" border=0 width=32 height=18></a>

</center>    
</td><td width="25%">
<center>

<img name="b" src="../images/german1.jpg" border=0 width=32 height=18>

</center>  
</td><td width="25%">
<center>

<a href="langhome.asp?spanish" onMouseOver="hiLite('c','c2','SPANISH')" onMouseOut="hiLite('c','c1','')"><img name="c" src="../images/spanish2.jpg" border=0 width=32 height=18></a>

</center>  
</td><td width="25%">
<center>

<a href="langhome.asp?french" onMouseOver="hiLite('d','d2','FRENCH')" onMouseOut="hiLite('d','d1','')"><img name="d" src="../images/french2.jpg" border=0 width=32 height=18></a>

</center>
</td></tr></table>
<!--end flags-->








<center>
<FONT CLASS="text">
Welcome, Authentik</FONT><br><FONT CLASS="textsmall">
 [<A HREF="acdetails.asp?german">YOUR ACCOUNT DETAILS</a>] - [<A HREF="logout.asp?german" onclick="WinOpen()">LOGOUT</A>]</font>
<br>
<b><FONT CLASS="text">
Wednesday, 22 May 2002
</font></b>
</center>


</td></tr></table>
<!--end outsideflags-->

</td></tr></table>
<!--end logoandflags-->








</td></tr><tr>


<td colspan="7">


<!--options--><br>
<table bordercolor="#000000" border="1" cellpadding="2" cellspacing="0" width="100%"><tr>
<td width="15%" bgcolor="#CCCCCC"><center><font class="text">[<a href="langhome.asp?german">GERMAN HOME</a>]</font></center></td>
<td width="14%" bgcolor="#FFFFFF"><center><font class="text">[<a href="search.asp?german">SEARCH</a>]</font></center></td>
<td width="14%" bgcolor="#FFFFFF"><center><font class="text">[<a href="browse.asp?german">BROWSE</a>]</font></center></td>
<td width="14%" bgcolor="#FFFFFF"><center><font class="text">[<a href="exercises.asp?german">EXERCISES</a>]</font></center></td>
<td width="14%" bgcolor="#FFFFFF"><center><font class="text">[<a href="latest.asp?german&5">LATEST</a>]</font></center></td>
<td width="14%" bgcolor="#FFFFFF"><center><font class="text">[<a href="polls.asp?german&0">POLLS</a>]</font></center></td>
<td width="15%" bgcolor="#FFFFFF"><center><font class="text">[<a href="help.asp?german">HELP</a>]</font></center></td></tr>
</table>
<!--end options-->




</td></tr>
<tr><td colspan="7">
<br>

<table bordercolor="#000000" border="0" cellpadding="0" cellspacing="0" width="100%" align="left">
<tr><td width="19%" valign="top">

<table bordercolor="#000000" border="1" cellpadding="2" cellspacing="0" height="100%" width="100%"><tr><td valign="top" bgcolor="#FFFFFF">
<center><FONT CLASS="headline">home</font>
</center><br>

<FONT CLASS="textred">To get started please click on a flag above.</font>
<br><br><FONT CLASS="text">
Please contact me should you have any queries.
</font>

</td></tr></table>

</td><td width="1%" valign="top">&nbsp;</td>

<td width="80%" valign="top" bgcolor="#FFFFFF">

<center>

<table bgcolor="#FFFFFF" bordercolor="#000000" cellspacing="0" cellpadding="2" border="1" width="100%" height="100%">
<tr><td valign="top">
<center><FONT CLASS="textred">To get started please click on a flag above.</font></center><br>
<FONT CLASS="headline">Welcome </font><br><br>


</td></tr></table>
</td></tr>
<tr><td colspan="3">
<br>
<center><FONT CLASS="text">&copy; Copyright 2002 </font><FONT CLASS="textsmall"><a href="http://www.me.com">[me]</a></font></center>

</td></tr>
</table>


</center>
</body>

</html>
0
Comment
Question by:hmcgeehan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 19

Expert Comment

by:webwoman
ID: 7027390
Your styles are wrong, you don't need quotes around the percentage values. You also don't need font tags AT ALL -- that's why you have the styles. You use a CLASS="style" in the tags where you want to apply the style.

If your mouseovers aren't working, you'll need to fix the javascript. I'd have to look at it closer to see if it's Netscape compatible.
0
 
LVL 19

Expert Comment

by:webwoman
ID: 7027404
Also...
YOu don't need to use CENTER in the TD. Set either the P or the TD as centered. If you're centering everything put it in the TD tag. Get rid of all your CENTER tags -- you're centering SOMETHING, put the alignment on what you're centering.

Bordercolor won't work in Netscape 4.
If you have a table set for 100% width, you don't need to ALIGN it.
Bgcolor on a table may or may not work correctly. Usually it doesn't. Set the color on the CELL, not the TABLE.
0
 
LVL 19

Accepted Solution

by:
DreamMaster earned 100 total points
ID: 7029479
There's a lot of stuff that doesn't need to be used, I removed most of it, and added proper indentation, you are missing </td></tr></table> at the end of the page. Netscape totally gets screwed up when tags are not properly closed.

This is likely to be your biggest problem.

This is the "cleaned" code that I made. Still not perfect, but it should help you on your way.

-----------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
      <title>AuthentikDigital.com - AS/A Level - GERMAN</title>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
      <STYLE TYPE="TEXT/CSS">
      <!--
      .text {font-family: Verdana; font-size: "75%"}
      .textred {font-family: Verdana; font-size: "80%"; color: red}
      .textlargered {font-family: Verdana; font-size: "200%"; color: red; text-decoration: underline}
      .headline {font-family: Verdana; font-size: "100%"; font-weight: 900}
      .textitalic {font-family: Verdana; font-size: "80%"; font-style: italic}
      .textarthead {font-family: Verdana; font-size: "90%"; font-weight: 900; color: red}
      .textsmall {font-family: Verdana; font-size: "60%"}
      .textsmallred {font-family: Verdana; font-size: "60%"; color: red}
      .textsmallblue {font-family: Verdana; font-size: "70%"; color: blue}
      .textbold {font-family: Verdana; font-size: "80%"; font-weight: bold}
      .textunder {font-family: Verdana; font-size: "80%"; text-decoration: underline}
      .textboldunder {font-family: Verdana; font-size: "80%"; font-weight: bold; text-decoration: underline}
      :link    { color: blue; text-decoration: underline}
      :active  { color: blue; text-decoration: underline}
      :visited { color: blue; text-decoration: underline}
      :hover   { color: red; text-decoration: underline}
      body { font-family: Verdana, sans-serif; background-color: #999966 }


-->
</STYLE>
      <script language="javascript">
      <!-- hide script from old browsers

      //detect browser:
      browserName = navigator.appName;
      browserVer = parseInt(navigator.appVersion);
      if (browserName == "Netscape" && browserVer >= 3) browserVer = "1";
      else if (browserName == "Microsoft Internet Explorer" && browserVer == 4) browserVer = "1";
      else browserVer = "2";


      //preload images:
      if (browserVer == 1)
      {
            a1 = new Image(32,18);
            a1.src = "../images/home1a.jpg";
            a2 = new Image(32,18);
            a2.src = "../images/home2a.jpg";
            b1 = new Image(32,18);
            b1.src = "../images/german2.jpg";
            b2 = new Image(32,18);
            b2.src = "../images/german1.jpg";
            c1 = new Image(32,18);
            c1.src = "../images/spanish2.jpg";
            c2 = new Image(32,18);
            c2.src = "../images/spanish1.jpg";
            d1 = new Image(32,18);
            d1.src = "../images/french2.jpg";
            d2 = new Image(32,18);
            d2.src = "../images/french1.jpg";
      }

      //image swapping function:
      function hiLite(imgDocID, imgObjName, comment)
      {
            if (browserVer == 1)
            {
                  document.images[imgDocID].src = eval(imgObjName + ".src");
                  window.status = comment; return true;
            }
      }
      //end hiding -->
      </script>

</head>
<body>
<center>
<!--maintable-->

paul

<table bgcolor="#999966" bordercolor="#000000" cellspacing="0" cellpadding="0" border="0" width="800">
      <tr>
            <td colspan="7">
                  <!--logoandflags-->
                  <table width="100%" height="100%">
                        <tr>
                              <td width="50%" bgcolor="#999966" align="center">
                                    <!--mainlogo-->
                                    <table bgcolor="#FFFFFF" width="408" bordercolor="#000000" cellspacing="0" cellpadding="0" border="1">
                                          <tr>
                                                <td align="center"><img src="../images/authdigi.jpg"></td>
                                          </tr>
                                    </table>
                                    <!--end mainlogo-->
                              </td>
                              <td width="50%" bgcolor="#999966" align="center">
                                    <!--outsideflags-->
                                    <table bgcolor="#FFFFFF" cellpadding="0" cellspacing="0" bordercolor="#000000" border="1" width="100%">
                                          <tr>
                                                <td align="center" class="text">
                                                      <!--flags-->
                                                            <table bgcolor="#FFFFFF" cellpadding="0" cellspacing="2">
                                                                  <tr>
                                                                        <td width="25%" bgcolor="#FFFFFF" align="center">
                                                                              <a href="index.asp?none" onMouseOver="hiLite('a','a2','HOME')" onMouseOut="hiLite('a','a1','')"><img name="a" src="../images/home1a.jpg" border=0 width=32 height=18></a>

                                                                        </td>
                                                                        <td width="25%" align="center">
                                                                              <img name="b" src="../images/german1.jpg" border=0 width=32 height=18>
                                                                        </td>
                                                                        <td width="25%" align="center">
                                                                              <a href="langhome.asp?spanish" onMouseOver="hiLite('c','c2','SPANISH')" onMouseOut="hiLite('c','c1','')"><img name="c" src="../images/spanish2.jpg" border=0 width=32 height=18></a>
                                                                        </td>
                                                                        <td width="25%" align="center">
                                                                              <a href="langhome.asp?french" onMouseOver="hiLite('d','d2','FRENCH')" onMouseOut="hiLite('d','d1','')"><img name="d" src="../images/french2.jpg" border=0 width=32 height=18></a>
                                                                        </td>
                                                                  </tr>
                                                            </table>
                                                      <!--end flags-->
                                                      Welcome, Authentik<br><FONT CLASS="textsmall">[<A HREF="acdetails.asp?german">YOUR ACCOUNT DETAILS</a>] - [<A HREF="logout.asp?german" onclick="WinOpen()">LOGOUT</A>]</font><br><b>Wednesday, 22 May 2002</b>
                                                </td>
                                          </tr>
                                    </table>
                                    <!--end outsideflags-->
                              </td>
                        </tr>
                  </table>
                  <!--end logoandflags-->
            </td>
      </tr>
      <tr>
            <td colspan="7">
                  <!--options--><br>
                  <table bordercolor="#000000" border="1" cellpadding="2" cellspacing="0" width="100%">
                        <tr>
                              <td width="15%" bgcolor="#CCCCCC"><center><font class="text">[<a href="langhome.asp?german">GERMAN HOME</a>]</font></center></td>
                              <td width="14%" bgcolor="#FFFFFF"><center><font class="text">[<a href="search.asp?german">SEARCH</a>]</font></center></td>
                              <td width="14%" bgcolor="#FFFFFF"><center><font class="text">[<a href="browse.asp?german">BROWSE</a>]</font></center></td>
                              <td width="14%" bgcolor="#FFFFFF"><center><font class="text">[<a href="exercises.asp?german">EXERCISES</a>]</font></center></td>
                              <td width="14%" bgcolor="#FFFFFF"><center><font class="text">[<a href="latest.asp?german&5">LATEST</a>]</font></center></td>
                              <td width="14%" bgcolor="#FFFFFF"><center><font class="text">[<a href="polls.asp?german&0">POLLS</a>]</font></center></td>
                              <td width="15%" bgcolor="#FFFFFF"><center><font class="text">[<a href="help.asp?german">HELP</a>]</font></center></td>
                        </tr>
                  </table>
                  <!--end options-->
            </td>
      </tr>
      <tr>
            <td colspan="7">
                  <br>
                  <table bordercolor="#000000" border="0" cellpadding="0" cellspacing="0" width="100%" align="left">
                        <tr>
                              <td width="19%" valign="top">
                                    <table bordercolor="#000000" border="1" cellpadding="2" cellspacing="0" height="100%" width="100%">
                                          <tr>
                                                <td valign="top" bgcolor="#FFFFFF" align="center">
                                                      <FONT CLASS="headline">home</font><br><FONT CLASS="textred">To get started please click on a flag above.</font><br><br><FONT CLASS="text">Please contact me should you have any queries.</font>
                                                </td>
                                          </tr>
                                    </table>
                              </td>
                              <td width="1%" valign="top">&nbsp;</td>
                              <td width="80%" valign="top" bgcolor="#FFFFFF" align="center">
                                    <table bgcolor="#FFFFFF" bordercolor="#000000" cellspacing="0" cellpadding="2" border="1" width="100%" height="100%">
                                          <tr>
                                                <td valign="top" align="center"><FONT CLASS="textred">To get started please click on a flag above.</font><br><FONT CLASS="headline">Welcome </font><br><br></td>
                                          </tr>
                                    </table>
                              </td>
                        </tr>
                        <tr>
                              <td colspan="3" align="center"><br><FONT CLASS="text">&copy; Copyright 2002 </font><FONT CLASS="textsmall"><a href="http://www.me.com">[me]</a></font></td>
                        </tr>
                  </table>
            </td>
      </tr>
</table>
</body>

</html>
------------------------------------------
Good luck,
Max.
0
 
LVL 19

Expert Comment

by:DreamMaster
ID: 7038746
Thanks for the Grade A :-)

Max.
(From Greece where he is on holiday now)
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question