
November 23rd, 2000, 04:03 PM
|
|
Junior Member
|
|
Join Date: Nov 2000
Posts: 5
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Hi ya, ok this is my little problem. You know how IE and netscape have diffrent objects for layers? So I made a simple little function based on what browser someone was using. The problem is variable scope I guess. Here's the code:
var layertype="null";
function find(){
if (navigator.appName == "Netscape") {
layertype="document.layer" }
else {
layertype="layer.style.";
}
}
I tried using this for my layers but I always get "laytertype" to come as "null". I even inserted a piece of code that wrote what the app name was once the function got called and it gave me the correct browser name.
Any help in this would be appreciated.
|