M
Mark Preston
I know... I should be able to figure this out. Its silly and its simple
but its driving me crackers. Don't tell me I should leave it a while and
come back to it - I know I should and it will probably be blatantly
obvious when I do. But at the moment its driving me nuts...
I have a pop-up, pop-down set of layers. They are turned on and off by
menu links. No problem, except that clicking a link for a layer when the
layer is already displayed switches it off. I'm trying to prevent that
with a simple, one-line, conditional:-
"layer" is the layer to switch on.
"set_layer" is the currently displayed layer.
"hideIt()" hides the specified layer.
My one-liner is:
if (!layer==set_layer) hideIt(set_layer);
Now why - and I know I should know this - does this condition never hide
a layer?
but its driving me crackers. Don't tell me I should leave it a while and
come back to it - I know I should and it will probably be blatantly
obvious when I do. But at the moment its driving me nuts...
I have a pop-up, pop-down set of layers. They are turned on and off by
menu links. No problem, except that clicking a link for a layer when the
layer is already displayed switches it off. I'm trying to prevent that
with a simple, one-line, conditional:-
"layer" is the layer to switch on.
"set_layer" is the currently displayed layer.
"hideIt()" hides the specified layer.
My one-liner is:
if (!layer==set_layer) hideIt(set_layer);
Now why - and I know I should know this - does this condition never hide
a layer?