...

View Full Version : NS4 - class="clase_name" crashes



requestcode
10-14-2002, 06:50 PM
Can anyone tell me why this would cause NS4 to crash when the page loads?
<html>
<head>
<title>Test Menu Navigation</title>
<STYLE>
A{text-decoration:none}
.divClassa {font-size:10pt;font-face:Arial;position:relative;font-weight:bold;color:red;background-color:#EEEEEE;border:1px solid black;padding:0px;}
.divClassb {font-size:10pt;font-face:Arial;position:relative;font-weight:bold;color:blue;background-color:#DDDDDD;border:1px solid black;padding:0px;}
</STYLE>
</head>
<body>
<TABLE WIDTH="300" HEIGHT="10" ALIGN="center" VALIGN="top" BORDER="0" CELLPADDING="0" CELLSPACING="0">
<TR ALIGN="center">
<TD ALIGN="center" ID="link0" onMouseOver="this.className='divClassb'" onMouseOut="this.className='divClassa'" class="divClassa">
<a href="sompage0.html">somepage0</a>
</TD>
<TD ALIGN="center" ID="link1" onMouseOver="this.className='divClassb'" onMouseOut="this.className='divClassa'" class="divClassa">
<a href="somepage1.html">somepage1</a>
</TD>
<TD ALIGN="center" ID="link2" onMouseOver="this.className='divClassb'" onMouseOut="this.className='divClassa'" class="divClassa">
<A HREF="sompage2.html">somepage2</A>
</TD>
<TD ALIGN="center" ID="link3" onMouseOver="this.className='divClassb'" onMouseOut="this.className='divClassa'" class="divClassa">
<A HREF="somepage3.html">somepage3</A>
</TD>
</TR>
</TABLE>
</body>
</html>

If I remove the class="Class_name" then it does not crash, but of course I lose my styles. I know that the styles don't work with NS4 I just don't want it to crash.

adios
10-14-2002, 07:07 PM
This:

<TD.......style="position:relative;......">

...generates an <ilayer> in Navigator. These are buggier than Fairbanks in July; it's not immediately obvious why they would cause your page to crash onload, but nothing should surprise anyone about NS4 by now. In any event, you've got browser-specific ('className') code in there so...not much point.

requestcode
10-14-2002, 07:14 PM
Thanks adios - that was the problem. I knew the "this.className" would not work for NS4, but I just wanted to have it display correctly without using absolute positioning. I guess I will have to try a different approach. Thank you.

adios
10-14-2002, 08:15 PM
I'd sort of forgotten what a waste of time Navigator is to deal with, not to mention the compromises you have to make...this reminded me:


<html>
<head>
<title>Test Menu Navigation</title>
<style type="text/css">

a {
color: red;
text-decoration: none;
}

a:hover {
color: blue;
}

.over {
color: blue;
text-decoration: none;
}

.divClassa {
font: bold 12px Arial;
color: red;
background-color: #EEEEEE;
layer-background-color: #EEEEEE;
}

.divClassb {
font: bold 12px Arial;
color: blue;
background-color: #DDDDDD;
layer-background-color: #DDDDDD;
}

</style>
<script type="text/javascript" language="javascript">

function NS_rollover(lyr, content) {
lyr.document.write('<span class="divClassb">' + content + '</span>');
lyr.document.close();
}

function NS_rollout(lyr, content) {
lyr.document.write('<span class="divClassa">' + content + '</span>');
lyr.document.close();
}

</script>
</head>
<body>
<div align="center"><br>
<TABLE BORDER="1" CELLPADDING="0" CELLSPACING="0" bordercolor="#000000">
<TR>
<TD ID="link0" onMouseOver="this.className='divClassb'" onMouseOut="this.className='divClassa'" class="divClassa"><ilayer><layer onmouseover="NS_rollover(this,'<a class=over href=sompage0.html>&amp;nbsp;somepage0&amp;nbsp;</a>')" onmouseout="NS_rollout(this,'<a href=sompage0.html>&amp;nbsp;somepage0&amp;nbsp;</a>')"><a href="sompage0.html">&amp;nbsp;somepage0&amp;nbsp;</a></layer></ilayer></TD>
<TD ID="link1" onMouseOver="this.className='divClassb'" onMouseOut="this.className='divClassa'" class="divClassa"><ilayer><layer onmouseover="NS_rollover(this,'<a class=over href=sompage1.html>&amp;nbsp;somepage1&amp;nbsp;</a>')" onmouseout="NS_rollout(this,'<a href=sompage1.html>&amp;nbsp;somepage1&amp;nbsp;</a>')"><a href="somepage1.html">&amp;nbsp;somepage1&amp;nbsp;</a></layer></ilayer></TD>
<TD ID="link2" onMouseOver="this.className='divClassb'" onMouseOut="this.className='divClassa'" class="divClassa"><ilayer><layer onmouseover="NS_rollover(this,'<a class=over href=sompage2.html>&amp;nbsp;somepage2&amp;nbsp;</a>')" onmouseout="NS_rollout(this,'<a href=sompage2.html>&amp;nbsp;somepage2&amp;nbsp;</a>')"><A HREF="sompage2.html">&amp;nbsp;somepage2&amp;nbsp;</A></layer></ilayer></TD>
<TD ID="link3" onMouseOver="this.className='divClassb'" onMouseOut="this.className='divClassa'" class="divClassa"><ilayer><layer onmouseover="NS_rollover(this,'<a class=over href=sompage3.html>&amp;nbsp;somepage3&amp;nbsp;</a>')" onmouseout="NS_rollout(this,'<a href=sompage3.html>&amp;nbsp;somepage3&amp;nbsp;</a>')"><A HREF="somepage3.html">&amp;nbsp;somepage3&amp;nbsp;</A></layer></ilayer></TD>
</TR>
</TABLE>
</div>
</body>
</html>

requestcode
10-14-2002, 08:54 PM
Thank you again adios. I had already started down a different page, but will take your code into consideration. It looks less complicated than what I had come up with.(If that is possible with NS4).



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum