Javascript / FireFox help needed

D

DutchMaster11

Can anyone tell me why the following code will work in IE7, but in in
Firefox (or any of its sub-browsers, like Flock)? Click on the link
that says "Alpha Communications / Alpha Media " in red. The Table row
below that one should toggle on/off every time its clicked. In
firefox, however, the TR never goes away and it seems like more TRs
are added the more its clicked... please help!! :)

Thanks!

Dutch






<html>
<head>

<title>Personal Menu</title>

<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">

<STYLE type="text/css">
<!--
INPUT {background-color:#FFFFFF; color:006600; font-
family:tahoma; font-size:9pt;}
SELECT {background-color:#FFFFFF; color:006600; font-
family:tahoma; font-size:9pt; border-style:solid; border-width:1px;
border-color:003300;}
TEXTAREA {background-color:#FFFFFF; color:006600; font-
family:tahoma; font-size:9pt;}
table.ad {background:#eaeaea;border-width: 1px;border-color:
#000000;border-style: solid;}
table.ad000000 {border-width: 1px;border-color: #000000;border-
style: solid;}
table.ad666666 {border-width: 1px;border-color: #666666;border-
style: solid;}
table.ad006600 {border-width: 1px;border-color: #006600;border-
style: solid;}
table.ad660000 {border-width: 1px;border-color: #660000;border-
style: solid;}
table.adFFFFFF {border-width: 1px;border-color: #FFFFFF;border-
style: solid;}
table.adheader {background:#EAFEEB;border-width: 1px;border-
color: #66CC66;border-style: solid;}
table.adheaderhl {background:#FFFFCC;border-width: 1px;border-
color: #66CC66;border-style: solid;}
table.sidebaroption {border-bottom-width: 1px;border-bottom-
color: #cccccc;border-bottom-style: dotted;}
table.sidebaroptionwh {border-bottom-width: 1px;border-bottom-
color: #FFFFFF;border-bottom-style: dotted;}
table.sidebaroption2 {border-bottom-width: 1px;border-bottom-
color: #000000;border-bottom-style: solid;}
table.sidebaroptionhl {background:#F7FFE0;border-bottom-width:
1px;border-bottom-color: #006600;border-bottom-style: solid;}
table.sidebaroptionhl2 {background:#FFFFCC;border-bottom-width:
1px;border-bottom-color: #330000;border-bottom-style: solid;}
.sidebaroptiontext {font-family: Tahoma;font-size: 11px;color:
#003300;}
.sidebaroptiontextbig {font-family: Tahoma;font-size:
13px;color: #009900;}
.bigger {font-family: arial;font-size: 20px;color: #000000;}
.big {font-family: arial;font-size: 14px;color: #000000;}
.reg {font-family: Tahoma;font-size: 12px;color: #000000;}
.header {font-weight:bold;font-family: Arial;font-size:
15px;color: #13529E;}
.small {font-family: tahoma;font-size: 11px;color: #000000;}
.xsmall {font-family: tahoma;font-size: 10px;color: #000000;}
.even{background-color: 006600;}
.odd{background-color: CC0000;}
.even2{background-color: FFFFFF;}
.odd2{background-color: FFFFFF;}
-->
</STYLE>

<script language="JavaScript">
<!--
if (document.images) {
header_dl_over = new Image();
header_dl_over.src = "/images/header_download_over.jpg";
header_dl_off = new Image();
header_dl_off.src = "/images/header_download.jpg";

header_login_over = new Image();
header_login_over.src = "/images/header_login_over.jpg";
header_login_off = new Image();
header_login_off.src = "/images/header_login.jpg";

header_personalmenu_over = new Image();
header_personalmenu_over.src = "/images/
header_personalmenu_over.jpg";
header_personalmenu_off = new Image();
header_personalmenu_off.src = "/images/header_personalmenu.jpg";

header_support_over = new Image();
header_support_over.src = "/images/header_support_over.jpg";
header_support_off = new Image();
header_support_off.src = "/images/header_support.jpg";

menu_home_over = new Image();
menu_home_over.src = "/images/menu_home_over.jpg";
menu_home = new Image();
menu_home.src = "/images/menu_home.jpg";

menu_about_over = new Image();
menu_about_over.src = "/images/menu_about_over.jpg";
menu_about = new Image();
menu_about.src = "/images/menu_about.jpg";

menu_faqs_over = new Image();
menu_faqs_over.src = "/images/menu_faqs_over.jpg";
menu_faqs = new Image();
menu_faqs.src = "/images/menu_faqs.jpg";

menu_support_over = new Image();
menu_support_over.src = "/images/menu_support_over.jpg";
menu_support = new Image();
menu_support.src = "/images/menu_support.jpg";

menu_contact_over = new Image();
menu_contact_over.src = "/images/menu_contact_over.jpg";
menu_contact = new Image();
menu_contact.src = "/images/menu_contact.jpg";

}


function toggleTR(objID) {
var obj = document.getElementById('detail' + objID);
if (obj.style.display == 'block') { obj.style.display = 'none'; }
else { obj.style.display = 'block'; }
}
function changeImages() {
if (document.images) {
for (var i=0; i<changeImages.arguments.length; i+=2) {
document[changeImages.arguments].src =
eval(changeImages.arguments[i+1] + ".src");
}
}
}
function openChild(file,window,w,h) {
newWindow=open(file,window,"scrollbars=1,width=" + w + ",height=" +
h + "");
if (newWindow.opener == null) newWindow.opener = self;
}
function setFocus(objID) {
var obj = document.getElementById(objID);
obj.focus();
}
function exitToRefresh (snapname)
{
for(var i=0; i < snapname.length; i++ )
{
window.opener.parent.refreshIframe(snapname);
}
window.opener.parent.refreshIframe('chartiframe');
window.opener.location.reload(true);
close ();
}
function exitToURL (url)
{
window.opener.location=url;
close ();
}
function redirect (url)
{
window.location=url;
}
function alternate(id){
var table = document.getElementById("locations");
var rows = table.getElementsByTagName("tr");
for(i = 0; i < rows.length; i=i+2){
if (i==id)
{rows.className = "odd";
rows[i+1].className = "odd2";}
else
{rows.className = "even";
rows[i+1].className = "even2";}
}
}
// -->
</script>

</head>

<body TOPMARGIN=0 BottomMargin=0 LeftMargin=0 RightMargin=0
link="#006600" vlink="#006600" alink="#006600" bgcolor="E2E7F0"
text="#000000">

<script type="text/javascript" src="/wz_tooltip.js"></script>

<CENTER>

<TABLE border=0 bgcolor=ffffff Width=750 Class=ad666666
CellPadding=0 CellSpacing=0>

<TR Height=29>
<TD Colspan=2 class=reg>

</TD>
</TR>
<TR>
<TD colspan=2 Class=reg align=center>
<TABLE cellpadding=2 cellspacing=0 Width=100% border=0>
<TR><TD width=150 valign=top Class=reg align=center>
<BR>
<TABLE cellpadding=0 cellspacing=0 width=140>

<TR><TD colspan=2 Class=reg>

<TABLE
width=140
onMouseOver="this.className='adheaderhl'"
onMouseOut="this.className='adheader'"
Class=adHeader>
<TR><TD Class=reg><B>
<font color=006600>Building Mgrs.</B>
</TD></TR></TABLE>
</TD></TR>
<TR><TD class=reg>
<TABLE cellpadding=0 cellspacing=2
onClick="window.location='http://keith/cgi-bin/site.exe?
Module=addperson&Refresh=140880778&SessionID=sF4eF3tM7t7&Addtype=Manager'"
style="cursor:hand"
width=100%
onMouseOver="this.className='sidebaroptionhl'"
onMouseOut="this.className='sidebaroption'"
Class=sidebaroption>
<TR><TD Class=sidebaroptiontext>

&nbsp;&nbsp;&nbsp;
Add New Building Mgr.
</TD></TR></TABLE>

</TD></TR>
<TR><TD class=reg>
<TABLE cellpadding=0 cellspacing=2
onClick="window.location='http://keith/cgi-bin/site.exe?
Module=personalmenu&Refresh=140880778&action=View&SessionID=sF4eF3tM7t7&Type=manager'"
style="cursor:hand"
width=100%
onMouseOver="this.className='sidebaroptionhl'"
onMouseOut="this.className='sidebaroption'"
Class=sidebaroption>
<TR><TD Class=sidebaroptiontext>
&nbsp;&nbsp;&nbsp;
View my Building Mgrs.
</TD></TR></TABLE>
</TD></TR>
</TABLE>
<BR>
<TABLE cellpadding=0 cellspacing=0 width=140>

<TR><TD colspan=2 Class=reg>
<TABLE
width=140
onMouseOver="this.className='adheaderhl'"
onMouseOut="this.className='adheader'"
Class=adHeader>

<TR><TD Class=reg><B>
<font color=006600>Building Options</B>
</TD></TR></TABLE>
</TD></TR>
<TR><TD class=reg>
<TABLE cellpadding=0 cellspacing=2
onClick="window.location='http://keith/cgi-bin/site.exe?
Module=buildinginformation&Refresh=140880778&action=add&SessionID=sF4eF3tM7t7'"
style="cursor:hand"
width=100%
onMouseOver="this.className='sidebaroptionhl'"
onMouseOut="this.className='sidebaroption'"
Class=sidebaroption>
<TR><TD Class=sidebaroptiontext>

&nbsp;&nbsp;&nbsp;
Add New Building
</TD></TR></TABLE>
</TD></TR>

</TABLE>
<BR>
<TABLE cellpadding=0 cellspacing=0 width=140>
<TR><TD colspan=2 Class=reg>
<TABLE
width=140
onMouseOver="this.className='adheaderhl'"
onMouseOut="this.className='adheader'"
Class=adHeader>
<TR><TD Class=reg><B>
<font color=006600>My Account</B>

</TD></TR></TABLE>
</TD></TR>
<TR><TD class=reg>
<TABLE cellpadding=0 cellspacing=2
onClick="window.location='http://keith/cgi-bin/site.exe?
Module=personalmenu&Refresh=140880778&SessionID=sF4eF3tM7t7'"
style="cursor:hand"
width=100%
onMouseOver="this.className='sidebaroptionhl'"
onMouseOut="this.className='sidebaroption'"
Class=sidebaroption>

<TR><TD Class=sidebaroptiontext>
&nbsp;&nbsp;&nbsp;
My Personal Menu
</TD></TR></TABLE>
</TD></TR>
<TR><TD class=reg>
<TABLE cellpadding=0 cellspacing=2
onClick="window.location='http://keith/cgi-bin/site.exe?
Module=personalinformation&Refresh=140880778&SessionID=sF4eF3tM7t7'"
style="cursor:hand"
width=100%
onMouseOver="this.className='sidebaroptionhl'"
onMouseOut="this.className='sidebaroption'"
Class=sidebaroption>
<TR><TD Class=sidebaroptiontext>

&nbsp;&nbsp;&nbsp;
Edit My Information
</TD></TR></TABLE>
</TD></TR>
<TR><TD class=reg>
<TABLE cellpadding=0 cellspacing=2
onClick="window.location='http://keith/cgi-bin/site.exe?
Module=childaccounts&Refresh=140880778&SessionID=sF4eF3tM7t7'"
style="cursor:hand"
width=100%
onMouseOver="this.className='sidebaroptionhl'"
onMouseOut="this.className='sidebaroption'"
Class=sidebaroption>

<TR><TD Class=sidebaroptiontext>
&nbsp;&nbsp;&nbsp;
Manage Child Accounts
</TD></TR></TABLE>
</TD></TR>
<TR><TD class=reg>
<TABLE cellpadding=0 cellspacing=2
onClick="window.location='http://keith/cgi-bin/site.exe?
Module=changepassword&Refresh=140880778&SessionID=sF4eF3tM7t7'"
style="cursor:hand"
width=100%
onMouseOver="this.className='sidebaroptionhl'"
onMouseOut="this.className='sidebaroption'"
Class=sidebaroption>

<TR><TD Class=sidebaroptiontext>
&nbsp;&nbsp;&nbsp;
Change My Password
</TD></TR></TABLE>
</TD></TR>
<TR><TD class=reg>
<TABLE cellpadding=0 cellspacing=2
onClick="window.location='http://keith/cgi-bin/site.exe?
Module=index&Refresh=140880778&killlogin=Y&sID=sF4eF3tM7t7'"
style="cursor:hand"
width=100%
onMouseOver="this.className='sidebaroptionhl'"
onMouseOut="this.className='sidebaroption'"
Class=sidebaroption>

<TR><TD Class=sidebaroptiontext>
&nbsp;&nbsp;&nbsp;
Logout
</TD></TR></TABLE>
</TD></TR>
</TABLE>

<BR><BR><BR><BR><BR>
</TD><TD width=600 Class=reg valign=top align=center><BR>
<TABLE class=sidebaroption CellPadding=3 CellSpacing=0 Border=0
Width=80%>
<TR>
<TD Class=header align=center>
Personal Menu
<BR><Font class=small>You are logged in as an 'Installer'</font>
</TD>

</TR>
</TABLE>
<BR><BR>
<TABLE class=sidebaroptionwh style="cursor:hand"
onMouseOver="this.className='sidebaroptionhl'"
onMouseOut="this.className='sidebaroptionwh'" border=0 iD="tableA0001"
width=80% cellpadding=2 cellspacing=0>
<TR onClick="toggleTR('A0001')"><TD Colspan=2 valign=top
onClick="toggleTR('A0001')">
<TABLE onClick="toggleTR('A0001')" border=0 width=90%
class=sidebaroption cellpadding=1><TR><TD Class=sidebaroptiontextbig
Class=sidebaroptiontextbig>

<font color=660000><B><LI>Alpha Communications / Alpha Media
</TD></TR></TABLE>
</TD></TR>
<TR style="display:none;visibilty:hidden" ID="detailA0001">
<TD Class=sidebaroptiontext valign=top>
<TABLE onClick="openChild('http://maps.yahoo.com/py/maps.py?
Pyt=Tmap&GET%A0Map=Get+Map&addr=42%20Central%20Drive&csz=Farmingdale
%20NY','newone',700,600);" style="cursor:hand"
onMouseOver="this.className='sidebaroptionhl'"
onMouseOut="this.className='sidebaroption'" border=0 width=90%
class=sidebaroption cellpadding=1><TR><TD Class=sidebaroptiontext
align=center>
<B>## User located at:</B><BR><BR>

42 Central Drive<BR>
Farmingdale, NY 11735-1202
<BR>
<font class=small>(Click to view map)</font>

</TD></TR></TABLE>
</TD>
<TD Class=sidebaroptiontext valign=top>
<TABLE onClick="window.location='http://keith/cgi-bin/site.exe?
Module=buildinginformation&Refresh=140880778&action=Edit&SessionID=sF4eF3tM7t7&ID=1'"
style="cursor:hand" onMouseOver="this.className='sidebaroptionhl'"
onMouseOut="this.className='sidebaroption'" border=0 width=90%
class=sidebaroption cellpadding=1>
<TR><TD width=20 Valign=middle Class=sidebaroptiontext
align=left><IMG src="/images/icon_edit.gif"></TD><TD Valign=middle
Class=sidebaroptiontext align=left><font color=990000><font
color=990000>View / Update Building Information</TD></TR>
</TABLE>

<TABLE border=0 width=90% class=sidebaroption cellpadding=1>
<TR><TD Class=sidebaroptiontext><b>Building Manager:</TD><TD
Class=sidebaroptiontext>Jay Adams</TD></TR>
<TR><TD Class=sidebaroptiontext><b>Installer:</TD><TD
Class=sidebaroptiontext>Keith Maurino</TD></TR>

<TR><TD Class=sidebaroptiontext><b>Sales Partner:</TD><TD
Class=sidebaroptiontext>Jason Goldberg</TD></TR>
</TABLE>
<BR>
</TD>
</TR>
</TABLE>
<BR><BR>
</TD></TR></TABLE>

</TD>
</TR>
</TABLE>

<BR>
<font class=reg>
Copyright © 2007 <A href="http://www.alpha-comm.com/"
Target="new">Alpha Communications</A> and <A href="http://
www.alphamedia.net/" Target="new">Alpha Media, Inc.</A> All Rights
Reserved.
</body>
</html>
 
J

Jonathan N. Little

DutchMaster11 said:
Can anyone tell me why the following code will work in IE7, but in in
Firefox (or any of its sub-browsers, like Flock)? Click on the link
that says "Alpha Communications / Alpha Media " in red. The Table row
below that one should toggle on/off every time its clicked. In
firefox, however, the TR never goes away and it seems like more TRs
are added the more its clicked... please help!! :)

Thanks!

Dutch
<snip massive code sample>

Post URL to your page not the html
 
D

DutchMaster11

The page is not public, or I would have. the HTML file works fine on
it's own, even though the pictures dont display.
 
J

Jonathan N. Little

DutchMaster11 said:
The page is not public, or I would have. the HTML file works fine on
it's own, even though the pictures dont display.
1) please quote properly
2) well make it public, upload at least a sample page somewhere
 
C

cwdjrxyz

Can anyone tell me why the following code will work in IE7, but in in
Firefox (or any of its sub-browsers, like Flock)? Click on the link
that says "Alpha Communications / Alpha Media " in red. The Table row
below that one should toggle on/off every time its clicked. In
firefox, however, the TR never goes away and it seems like more TRs
are added the more its clicked... please help!! :)


I am not quoting the very long code again. One can copy the code, take
it to the W3C validator and paste it into an input box there. Since
you do not include a Doctype, I had to guess html 4.01 transitional to
be closest to what you have. If you try to validate as anything else
between html 2.0 and html 4.01 strict, there are many more errors. The
page could not be xhtml because of the lack of special xhtml symbols.
The problem is that about 75 errors are indicated in the code
validated as html transitional. Some are just fairly formal things
that may not cause problems on most current browsers, but others are
not. So my first suggestion is to get the page to validate as html
4.01 transitional. Even this may not solve your problem, because you
use quite a bit of script which the W3C validator does not check. But
since script can often be more difficult to correct than html, getting
the html right at first is a good place to start. If the script turns
out to be the problem, it may then pay to post in a javascript group
if someone here does not see the cause of the script problem. You
should consider that those who post here get paid very little - zero,
in fact - and code as long as you posted could take a very long time
to evaluate. Thus it pays to post the url of a valid working example
that shows the problem. You need only include enough code in the
example page to show the problem, with the bulk of the code having
nothing related to display of the problem removed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top