...

View Full Version : Hiding Rows - FireFox



mark87
12-22-2004, 10:47 PM
Hi, on a page of my site I am using Javascript to hide/show rows. Works perfect in IE, but in Mozilla (and possibly other browsers) it does not work.

Also, any way to hide the rows straight away other than the onload event? I am currently using onload to run a function which hides the rows I want to hide, but the rows are quickly shown beforehand - not really a problem I guess, but it's kind of annoying!

The page is -
http://mysite.wanadoo-members.co.uk/downfallband/futuredates.htm

Thanks for any help. :P

fci
12-22-2004, 11:10 PM
set the style for those cells.. example..

[..]style="display:none;">[..]

and use getElementById instead of document.all, if you used Firefox it would say something like this:

Warning: Non-standard document.all property was used. Use W3C standard document.getElementById() instead.
Source File: http://mysite.wanadoo-members.co.uk/downfallband/futuredates.htm#
Line: 27

mark87
12-22-2004, 11:55 PM
Cheers, but putting in the display:none; stops it from being displayed when I click the link.

Using getelementid works though, thanks :)

mark87
12-24-2004, 01:54 PM
Sorry, can anyone help with this? :)

Need to make the rows hidden but not prevent them from being displayed when the links are clicked.

fci
12-24-2004, 06:20 PM
take a look at this:

<tr>
<td bordercolorlight="#262626" bordercolordark="#262626" style="border: 1px solid rgb(38, 38, 38);" align="center" bgcolor="#262626" height="102" width="65%">
<p align="left">
<font face="Century Gothic" size="5">
<b>. :</b>
future dates</font><font size="1"></font></p><p align="left">
<font size="1"> <font face="Century Gothic">click a date for more details |
<a class="type1" href="#" onclick="javascript:window.open('futuredates.htm','newwindow','toolbar=no, menubar=no')">
<font color="#ffffff">open in new window</font></a></font></font><font size="2"><font face="Century Gothic" size="2"><br>
--------------------------------------------------------------</font></font></p>
<p align="left">
<font size="2"> <font face="Century Gothic">+ <a class="type1" href="#" onclick="ShowOrHideDates('DATE1');">
<font color="#ffffff">16.01.05 - dublin castle</font></a></font></font></p>
<p align="left" style="display:none; border: 1px solid rgb(38, 38, 38);" id="DATE1">
<font face="Century Gothic" size="2">
<b>date </b>: sunday 16th january<b><br>
place </b>: dublin castle<b><br>
town </b>: camden, london<b><br>
price </b>: tba<b><br>
time </b>: tba<b><br>
other bands </b>: gozer //
<a target="_blank" href="http://www.mindcrow.com/"><font color="#ffffff">
mindcrow</font></a><b><br>
website </b>: </font>
<font color="#ffffff" face="Century Gothic" size="2">
<a target="_blank" href="http://www.dublincastle.co.uk/">
<font color="#ffffff">www.</font></a></font><a target="_blank" href="http://www.dublincastle.co.uk/"><font color="#ffffff" face="Century Gothic">dublincastle.co.uk</font></a></font></p>
</td>
</tr>

also, you will no longer need your onload function to run. you may want to change the p style so it indents the way it did previously...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum