HighDots Forums  

Re: Javascript / FireFox help needed

Javascript JavaScript language (comp.lang.javascript)


Discuss Re: Javascript / FireFox help needed in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
David Mark
 
Posts: n/a

Default Re: Javascript / FireFox help needed - 07-20-2007 , 02:37 PM







DutchMaster11 wrote:
Quote:
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]
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
I count three toggleTR calls in onClick (sic) handlers that clearly
overlap. You only need one. I am not surprised that you are getting
odd results.

Quote:
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%20Dri ve&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[s] 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&actio n=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
PS. A font tag with a class name? Tables-in-tables? Consecutive
line breaks? This whole thing is a mess and a maintenance nightmare.
Whoever wrote it needs to start over from scratch, reading a book on
Web authoring first. Adding script to this jumble at this point is
madness.

Quote:
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


Reply With Quote
  #2  
Old   
DutchMaster11
 
Posts: n/a

Default Re: Javascript / FireFox help needed - 07-20-2007 , 03:32 PM






On Jul 20, 2:37 pm, David Mark <dmark.cins... (AT) gmail (DOT) com> wrote:
Quote:
DutchMaster11 wrote:
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]
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

I count three toggleTR calls in onClick (sic) handlers that clearly
overlap. You only need one. I am not surprised that you are getting
odd results.





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%20Dri ve&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[s] 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&actio n=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

PS. A font tag with a class name? Tables-in-tables? Consecutive
line breaks? This whole thing is a mess and a maintenance nightmare.
Whoever wrote it needs to start over from scratch, reading a book on
Web authoring first. Adding script to this jumble at this point is
madness.

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
Thanks for your help - I will look into the overlapping onClicks,
however - there were issues getting just one to trigger correctly in
all appropriate areas.

In addition, *I* wrote this - and it is evetremely easy to maintain as
the code is generated by a CGI application. Tables-in-Tables are
perfectly fine as they are designed to be embedded. I've read MANY
books on web authoring, but I only take from them what I find to be
relevant to my own projects. Thanks for your feedback, despite the
fact I never asked.



Reply With Quote
  #3  
Old   
DutchMaster11
 
Posts: n/a

Default Re: Javascript / FireFox help needed - 07-20-2007 , 03:37 PM



In addition, removing all but one onClick (I left onClick in the <TR>
containing the inner table) - the same exact thing happens.. the TR
just grows every time its clicked.


Reply With Quote
  #4  
Old   
David Mark
 
Posts: n/a

Default Re: Javascript / FireFox help needed - 07-20-2007 , 03:53 PM




"DutchMaster11" <DutchMaster11 (AT) gmail (DOT) com> wrote

[snip]
Quote:
In addition, *I* wrote this - and it is evetremely easy to maintain as
the code is generated by a CGI application. Tables-in-Tables are
What does CGI have to do with it? You've got old-style HTML attributes like
VALIGN mixed with inline styles mixed with style sheets. Inline JS too.
CGI

Quote:
perfectly fine as they are designed to be embedded. I've read MANY
Depends on your definition of "perfectly fine." Trust me. You don't want
tables for this and of course, tables are what are causing you trouble at
the moment. Try writing it without tables first. Then add the scripting to
hide/show elements. Trust me.

Quote:
books on web authoring, but I only take from them what I find to be
relevant to my own projects. Thanks for your feedback, despite the
How do you determine what is relevant?

Quote:
fact I never asked.
You did ask. You asked me to wade through that whole mess to find your
problem. I advised you after wading through it that it was a mess, which
makes it harder to identify and fix your problems. That's relevant isn't
it?




Reply With Quote
  #5  
Old   
David Mark
 
Posts: n/a

Default Re: Javascript / FireFox help needed - 07-20-2007 , 03:55 PM




"DutchMaster11" <DutchMaster11 (AT) gmail (DOT) com> wrote

Quote:
In addition, removing all but one onClick (I left onClick in the <TR
containing the inner table) - the same exact thing happens.. the TR
just grows every time its clicked.

Post an abbreviated sample. I don't have time to read through that thing
again.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.