Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Help me....Fold out table on click in Netscape 4.x

Lara_tin2Lara_tin2 Posts: 2Member
I have a table contain data .I would like the table is hide , but when user click in its heading(or link ,button ...) It will be shown.
Ex :
Before click:
Heading
After click on Heading
Heading
data1 data2 data3
data4 data5 data6....

I tried to use table.style.display = 'none' and table.style.display = 'block'.
It works well in IE .But in Netscape 4.x , nothing happen when I click in tables heading.
How can I do ?
Thanks!!!

My code is like :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">


New Document





function togle(){
var table = document.getElementById('table2');

if (table.style.display=='none'){
table.style.display='block';

}else{
table.style.display='none';
}
}




Show/Hide


TABLE1








data1

data2

data3

data4

TABLE2








data5

data6

data7

data8

TABLE3








data9

data10

data11

data12




Comments

  • WeirdofreakWeirdofreak Posts: 439Member
    NS4 is hideous. You can't change the display: style of anything. In fact, you can't change most styles, and the ones that you vcan change can only be changed with a poition of absoute or relative. See http://www.quirksmode.org/browsers/netscape4.html for more.
  • zanfardinomzanfardinom Posts: 4Member
    Hey hope this helps,

    function goes in heading






    in the body




    Then you can add some css to it so you can make it look good. Hope this helps.

    mdawg




    : I have a table contain data .I would like the table is hide , but when user click in its heading(or link ,button ...) It will be shown.
    : Ex :
    : Before click:
    : Heading
    : After click on Heading
    : Heading
    : data1 data2 data3
    : data4 data5 data6....
    :
    : I tried to use table.style.display = 'none' and table.style.display = 'block'.
    : It works well in IE .But in Netscape 4.x , nothing happen when I click in tables heading.
    : How can I do ?
    : Thanks!!!
    :
    : My code is like :
    : <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    :
    :
    : New Document
    :
    :
    :
    :
    :
    : function togle(){
    : var table = document.getElementById('table2');
    :
    : if (table.style.display=='none'){
    : table.style.display='block';
    :
    : }else{
    : table.style.display='none';
    : }
    : }
    :
    :
    :
    :
    : Show/Hide
    :
    : TABLE1
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    data1
    :

    : data2
    :

    : data3
    :

    : data4
    :
    :
    : TABLE2
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    data5
    :

    : data6
    :

    : data7
    :

    : data8
    :
    :
    : TABLE3
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    data9
    :

    : data10
    :

    : data11
    :

    : data12
    :
    :
    :
    :
    :
    :
    :

  • Lara_tin2Lara_tin2 Posts: 2Member
    It does not work!Netscape 4 seem not support style block-hide!
  • zanfardinomzanfardinom Posts: 4Member
    I'm sorry about that. I will look more into it. I know this works for the latest version of Netscape. I didn't think to test in 4.x. I will get back to ya.

    mdawg

    : It does not work!Netscape 4 seem not support style block-hide!
    :

  • WeirdofreakWeirdofreak Posts: 439Member
    It supports it, but it cvan't be changed. See my earlier post for a link to a list of which ones can be. You [italic]could[/italic] use Z-index or visibility, but the page wouldn't reflow, so it's hardly worth it. My advice would be not to bother with NS4, it's just too incompatible.
Sign In or Register to comment.