MAN-BOY wrote:

First of all, according to the W3C specifications for HTML4.01, ID values

ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by
any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons
(":"), and periods (".")

I would suggest that you change your DIV ID's to div1 and div2 to start.

> OK, Here it is
> style code for my elements
> <STYLE TYPE="text/css">
>  #1
>   {
>     position:                   absolute;
>     left:                           200;
>     top:                           50;
>     border-top:               solid #000000 1px;
>     border-bottom:         solid #000000 1px;
>     border-right:             solid #000000 1px;
>     width:                       400px   ;
>     height:                       50px    ;
>     background-color:     #003399 ;
>     border:                      ridge  #FF55DD 3px;
>     text-align:                  center;
>     visibility:                  hidden;
>     z-index:                     0;
>   }
>
>  #2
>  {
>     position:                 absolute;
>     z-index:                  0       ;
>     left:                         200     ;
>     top:                         500     ;
>     width:                     400px   ;
>     height:                     50px    ;
>     border:                    ridge #999999 1px;
>     border:                    ridge #999999 3px;
>     border-top:              solid #000000 1px;
>     border-bottom:        solid #000000 1px;
>     border-right:            solid #FF9988 3px;
>     background-color:   #003399 ;
>     text-align:                center;
>     visibility:                visible;
>
>   }
> </STYLE>
>
> Developing for a NetScape browser
>
> I have 2 Elements
> when I click on DIV2 I would like to make DIV1 visible..  WHY DOESN'T THIS
> WORK..  ?????
> <BODY>
> <Script language="JavaSript">
> function showElement(i)
> {
>
>   this.document.all.i.style.visibility=visible;

Netscape doesn't know anything about the all collection this is an IE property.
For Netscape 4.x try

document.layers[i].visibility = "visible";

and for NS6.x try

document.getElementById(i).style.visibility = "visible";

to see if these work for you.



Reply via email to