Layers don`t show and hide with Mozilla and Netscape

Ask a Question related to Macromedia Dreamweaver, Design and Development.

  1. #1

    Default Layers don`t show and hide with Mozilla and Netscape

    Hi,

    I am trying to make layers visibel / hidden with onMouseOver/onMouseOut .
    But the Code DW generates works only with IE.
    Any suggestion ?

    function MM_showHideLayers() { //v3.0

    for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
    }
    }

    function MM_findObj(n, d) { //v3.0
    var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document); return x;
    }



    heinz.meier@justmail.de webforumsuser@macromedia.com Guest

  2. Similar Questions and Discussions

    1. Show and Hide Layers
      I am using the show and hide layers JS from Dreamweaver. I am using it to have simulated "tabs" on the HTML page, so I have a div set up for Tab1,...
    2. Netscape Show/hide Layers
      I am still using DW3 and have run into a problem with certain behavior problems when using Netscape browsers. These include the show/hide and...
    3. popup menus won't hide - PVII show/hide layers behaviour
      I've used the 'Auto show/hide by PVII" behaviour to create some popup menus for the navigation which make use of divs which appear and disappear....
    4. show hide netscape
      view the followinng page and both Netscape 7.2 and IE 6.0: http://128.164.137.82/sci/Untitled-2.htm When you click the check boxes for the...
    5. show/hide layers
      I've got two layers. The first layer is always visible. The second layer is only visible when you click on the first layer. How do I hide the...
  3. #2

    Default Re: Layers don`t show and hide with Mozilla and Netscape

    [email]heinz.meier@justmail.de[/email] wrote:
    > Hi,
    >
    > I am trying to make layers visibel / hidden with
    > onMouseOver/onMouseOut . But the Code DW generates works only with IE.
    > Any suggestion ?
    Yes. Upgrade to Dreamweaver MX. You're using Dreamweaver 3, as the following
    function shows.
    > function MM_findObj(n, d) { //v3.0
    DW3 can't be expected to cope with browsers and functions that didn't exist
    when it was released.

    --
    David Powers
    *******************************************
    No-nonsense reviews of computer books
    [url]http://japan-interface.co.uk/webdesign/books.html[/url]
    Save 10% on TopStyle CSS Editor
    *******************************************


    David Powers Guest

  4. #3

    Default Re: Layers don`t show and hide with Mozilla and Netscape

    > function MM_showHideLayers() { //v3.0
    > function MM_findObj(n, d) { //v3.0
    Your scripts are from DW3.0, and those are not compatible with Mozilla and Mozilla based (Netscape 6+) browsers.

    --
    Marja Ribbers-de Vroed
    Company website:
    [url]www.flevooware.nl[/url]
    Dreamweaver extensions
    [url]www.flevooware.nl/dreamweaver[/url]
    DMXzone - By developers for developers
    [url]www.DMXzone.com[/url]
    Marja Ribbers Guest

  5. #4

    Default Re: Layers don`t show and hide with Mozilla and Netscape

    Well, i have dreamweaver mx and the version of the findObj function is 4.01,
    and the drag layer behavior is not working on mozilla 1.4 and 1.3 (and i
    asumme netscape 7 either).

    Juan Zamudio

    "Marja Ribbers" <marja@nospam.flevooware.nl> escribió en el mensaje
    news:bfogbb$p4o$1@forums.macromedia.com...
    > function MM_showHideLayers() { //v3.0
    > function MM_findObj(n, d) { //v3.0
    Your scripts are from DW3.0, and those are not compatible with Mozilla and
    Mozilla based (Netscape 6+) browsers.

    --
    Marja Ribbers-de Vroed
    Company website:
    [url]www.flevooware.nl[/url]
    Dreamweaver extensions
    [url]www.flevooware.nl/dreamweaver[/url]
    DMXzone - By developers for developers
    [url]www.DMXzone.com[/url]


    Juan Zamudio Guest

  6. #5

    Default Re: Layers don`t show and hide with Mozilla and Netscape

    hi,

    bur dreamweaver 4+MX generate exactly the same code.
    the only differnce is the version number (4.0/5.0 instead of 3.0)

    the JavaScript-Code is exactly the same:

    function MM_showHideLayers() {
    var i,p,v,obj,args=MM_showHideLayers.arguments;
    for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
    }




    heinz.meier@justmail.de webforumsuser@macromedia.com Guest

  7. #6

    Default Re: Layers don`t show and hide with Mozilla and Netscape

    This specific compatibility problem is caused by the MM_findObj() function, and the 4.0 version is not compatible yet either.

    But for DW4/UD4 there is a free update available to upgrade Dreamweaver to version 4.01 and that upgrade also upgrades MM_findObj() from 4.0 to 4.01.
    And from that release on it's Mozilla/Netscape6+ compatible.

    --
    Marja Ribbers-de Vroed
    Company website:
    [url]www.flevooware.nl[/url]
    Dreamweaver extensions
    [url]www.flevooware.nl/dreamweaver[/url]
    DMXzone - By developers for developers
    [url]www.DMXzone.com[/url]


    "heinz.meier@justmail.de" <webforumsuser@macromedia.com> wrote in message news:bfom56$7aa$1@forums.macromedia.com...
    > hi,
    >
    > bur dreamweaver 4+MX generate exactly the same code.
    > the only differnce is the version number (4.0/5.0 instead of 3.0)
    >
    > the JavaScript-Code is exactly the same:
    >
    > function MM_showHideLayers() {
    > var i,p,v,obj,args=MM_showHideLayers.arguments;
    > for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args))!=null) { v=args[i+2];
    > if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    > obj.visibility=v; }
    > }
    >
    >
    >
    Marja Ribbers Guest

  8. #7

    Default Re: Layers don`t show and hide with Mozilla and Netscape

    > Well, i have dreamweaver mx and the version of the findObj function is 4.01,
    > and the drag layer behavior is not working on mozilla 1.4 and 1.3 (and i
    > asumme netscape 7 either).
    I guess that's a problem of the Drag Layer behavior then, and not of the MM_findObj() function.

    --
    Marja Ribbers-de Vroed
    Company website:
    [url]www.flevooware.nl[/url]
    Dreamweaver extensions
    [url]www.flevooware.nl/dreamweaver[/url]
    DMXzone - By developers for developers
    [url]www.DMXzone.com[/url]
    Marja Ribbers Guest

  9. #8

    Default Re: Layers don`t show and hide with Mozilla and Netscape

    Hi i have now an working version of the "findObj":

    function MM_findObj(n, d) { //v4.01
    var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);
    if(!x && d.getElementById) x=d.getElementById(n); return x;
    }

    I´ve tested it with mozilla 1.4, firebird 0.6, oper 7.11 and IE 5.5; all working

    another possibility to solve the problem:

    dont`t use the DW-Scripts. Take this one:
    --------
    var ie= ((document.all)&&(!document.layers)) ? true : false;
    var ns= ((document.layers)&&(!document.getElementById)) ? true : false;
    var moz= ((document.getElementById)&&(!document.all)) ? true : false;

    function showLayers(div) { //v0.1
    if(ie) {document.all[div].style.visibility="visible";}
    if(ns) {document.layers[div].visibility="show";}
    if(moz) {document.getElementById(div).style.visibility="vi sible";}
    }


    function hideLayers(div) { //v0.1
    if(ie) (document.all[div].style.visibility="hidden")
    if(ns) (document.layers[div].visibility="hide")
    if(moz) (document.getElementById(div).style.visibility="hi dden")

    }
    --------



    heinz.meier@justmail.de webforumsuser@macromedia.com Guest

  10. #9

    Default Re: Layers don`t show and hide with Mozilla and Netscape

    you need to find the "toggle layers extention". It's free and works in most
    browsers I've tested it in.

    -g-


    "Marja Ribbers" <marja@nospam.flevooware.nl> wrote in message
    news:bfoosu$d68$1@forums.macromedia.com...
    This specific compatibility problem is caused by the MM_findObj() function,
    and the 4.0 version is not compatible yet either.

    But for DW4/UD4 there is a free update available to upgrade Dreamweaver to
    version 4.01 and that upgrade also upgrades MM_findObj() from 4.0 to 4.01.
    And from that release on it's Mozilla/Netscape6+ compatible.

    --
    Marja Ribbers-de Vroed
    Company website:
    [url]www.flevooware.nl[/url]
    Dreamweaver extensions
    [url]www.flevooware.nl/dreamweaver[/url]
    DMXzone - By developers for developers
    [url]www.DMXzone.com[/url]


    "heinz.meier@justmail.de" <webforumsuser@macromedia.com> wrote in message
    news:bfom56$7aa$1@forums.macromedia.com...
    > hi,
    >
    > bur dreamweaver 4+MX generate exactly the same code.
    > the only differnce is the version number (4.0/5.0 instead of 3.0)
    >
    > the JavaScript-Code is exactly the same:
    >
    > function MM_showHideLayers() {
    > var i,p,v,obj,args=MM_showHideLayers.arguments;
    > for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args))!=null) {
    v=args[i+2];
    > if (obj.style) { obj=obj.style;
    v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    > obj.visibility=v; }
    > }
    >
    >
    >

    greg@gofothdesigns.com Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139