Results 1 to 7 of 7

Thread: Netscape 6 problem

  1. #1

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057

    Netscape 6 problem

    I am trying to get an image map to work for NS6 and it stops when it gets to this line:
    Code:
    eval("window.div" + varRegion + ".style.visibility = \"visible\"");
    this line was written to be interpreted by IE and I'm not sure what NS 6 thinks of it but I placed alerts all through the code and this is the line that follows the last alert to show meaning that it is halting here.
    thanks in advance,
    Michael
    I'm off to GalahTech, hope to see you there.

    If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.

  2. #2
    Addicted Member
    Join Date
    Nov 2001
    Location
    Yewston, Texis
    Posts
    240
    NS 6 uses a different Document Object Model (DOM) than IE. Sometimes your objects will work the same in both browsers, but often they won't.

    It looks like you are probably working with div's ("div" + varRegion), however, div's don't work too well in NS 6. Div's have much more flexibility in IE than in NS. However Layers in NS 6 is the DIV analogue.

    As I understand your problem, you are wanting some tiny pop-up "windows" to appear onMouseover with their own background colors. I think this should be achievable using layers.

    HTH

    cudabean

  3. #3
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    Code:
    <html>
      <head></head>
      <body>
        <p id="foo">Hello, world.</p>
        <script type="text/javascript">
          var myFoo = document.getElementById("foo");
          myFoo.style.color = "blue";
        </script>
      </body>
    </html>
    That should be W3C HTML and CSS DOM and ECMA-262 compliant. It should not us any MS proprietary extensions to JavaScript. For more information:

    http://www.w3c.org/
    http://www.ecma.org/
    http://developer.netscape.org/
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

  4. #4
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    Cuda, layers has been dropped from JavaScript. Further more, there is not two seperate DOMs. There is the W3C DOM, the ECMA mapping, and JavaScript's support of the ECMA standard. What you see as the IE DOM is propreitary extensions to undermind the standard.
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

  5. #5

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057
    Originally posted by Cudabean
    However Layers in NS 6 is the DIV analogue....I think this should be achievable using layers.
    I was under the impression that NS6 dropped the use of layers and adopted Div's is this not correct?
    I'm off to GalahTech, hope to see you there.

    If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.

  6. #6

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057
    Cyberthug...
    sorry for my ignorance but you lost me on that reply with the code snippit
    these are 2 other posts that i have made that refer to what I am trying to do here:
    http://www.vbforums.com/showthread.p...hreadid=133095
    http://www.vbforums.com/showthread.p...hreadid=133095
    I'm off to GalahTech, hope to see you there.

    If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.

  7. #7

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057

    got it :)

    Code:
    eval("document.getElementById('div' + varRegion ).style.visibility = \"visible\"");
    fixes the problem and works for ie 5+
    Now I have to make the previus menus dissapear when the user clicks for a new one but I think i can handle that
    thanks to nitwit @ Website Abstraction Help Forum for the code,
    and thanks to all who helped here,
    Michael
    I'm off to GalahTech, hope to see you there.

    If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.

Posting Permissions

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



Click Here to Expand Forum to Full Width