Click to See Complete Forum and Search --> : Netscape 6 problem
msimmons
Jan 15th, 2002, 01:31 PM
I am trying to get an image map to work for NS6 and it stops when it gets to this line:
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
Cudabean
Jan 15th, 2002, 02:05 PM
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
CiberTHuG
Jan 15th, 2002, 02:08 PM
<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/
CiberTHuG
Jan 15th, 2002, 02:13 PM
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.
msimmons
Jan 15th, 2002, 02:51 PM
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?
msimmons
Jan 15th, 2002, 03:07 PM
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.php?s=&threadid=133095
http://www.vbforums.com/showthread.php?s=&threadid=133095
msimmons
Jan 18th, 2002, 11:28 AM
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
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.