Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hiding Rows - FireFox

    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/...uturedates.htm

    Thanks for any help. :P

  • #2
    fci
    fci is offline
    Senior Coder
    Join Date
    Aug 2004
    Location
    Twin Cities
    Posts
    1,345
    Thanks
    0
    Thanked 0 Times in 0 Posts
    set the style for those cells.. example..
    Code:
    [..]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/...turedates.htm#
    Line: 27

  • #3
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Cheers, but putting in the display:none; stops it from being displayed when I click the link.

    Using getelementid works though, thanks
    Last edited by mark87; 12-22-2004 at 11:57 PM.

  • #4
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Sorry, can anyone help with this?

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

  • #5
    fci
    fci is offline
    Senior Coder
    Join Date
    Aug 2004
    Location
    Twin Cities
    Posts
    1,345
    Thanks
    0
    Thanked 0 Times in 0 Posts
    take a look at this:
    Code:
    <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...


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •