DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Javascript question

  1. #1
    Aditya K N Guest

    Javascript question


    Hi,
    We are trying javascript layers and document.all functionality in our project.
    We are facing some problems like it will work fine in IE but not in Netscape.
    What could be the reason? How we can overcome this kind of problems. Awaiting
    some answers.
    thanks
    aditya

  2. #2
    »«T®3|V|3 Guest

    Re: Javascript question


    document.all is not recognised by netsacpe, as far as i remember.
    here's an example of the equivelants, in the 2 browsers...

    <SCRIPT LANGUAGE="JavaScript">
    <!--
    if (is_ie4up) {
    document.all.maint.style.display = "none";
    document.all.submission.style.display = "none";
    document.all.nuggets.style.display = "none";
    }
    if (is_nav4up) {
    document.ids.maint.display="none";
    document.ids.submission.display = "none";
    document.ids.nuggets.display = "none";
    }
    //-->
    </SCRIPT>

    hope that helps??



    "Aditya K N" <adityakn@hotmail.com> wrote:
    >
    >Hi,
    > We are trying javascript layers and document.all functionality in our

    project.
    >We are facing some problems like it will work fine in IE but not in Netscape.
    >What could be the reason? How we can overcome this kind of problems. Awaiting
    >some answers.
    >thanks
    >aditya



  3. #3
    zikinf Guest

    Re: Javascript question

    Here is a better example :
    Grosso modo,
    the IE syntaxe is : document.all.layername
    the NS 4.x syntaxe is : document.layers["layername"]
    the NN6 syntaxe is : document.getElementById("layername")

    IE and NN6 often requires style, NOT nn4.

    examples for visibility :
    IE : document.all.mydiv.style.visibility = "hidden"; // could be "visible"
    NS4 : document.layers["mydiv"].visibility = "hide"; // could be "show"
    NN6 : document.getElementById("mydiv").style.visibility = "hidden"; // could
    be "visible"

    Visit good sites on DHTML for more precision, like:
    http://www.webreference.com/dhtml/
    http://www.webtools.com/toolbox/dhtml




    "»«T®3|V|3" <X|L3@xtr3m3.org.uk> a écrit dans le message news:
    3ad33201$1@news.devx.com...
    >
    > document.all is not recognised by netsacpe, as far as i remember.
    > here's an example of the equivelants, in the 2 browsers...
    >
    > <SCRIPT LANGUAGE="JavaScript">
    > <!--
    > if (is_ie4up) {
    > document.all.maint.style.display = "none";
    > document.all.submission.style.display = "none";
    > document.all.nuggets.style.display = "none";
    > }
    > if (is_nav4up) {
    > document.ids.maint.display="none";
    > document.ids.submission.display = "none";
    > document.ids.nuggets.display = "none";
    > }
    > file://-->
    > </SCRIPT>
    >
    > hope that helps??
    >
    >
    >
    > "Aditya K N" <adityakn@hotmail.com> wrote:
    > >
    > >Hi,
    > > We are trying javascript layers and document.all functionality in our

    > project.
    > >We are facing some problems like it will work fine in IE but not in

    Netscape.
    > >What could be the reason? How we can overcome this kind of problems.

    Awaiting
    > >some answers.
    > >thanks
    > >aditya

    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center