Link to home
Start Free TrialLog in
Avatar of juliandormon
juliandormon

asked on

Layers visibility question

I want to call a certain function onResize that repositions a layer if it is visible. So I have a 2 part question,
a) How to a determine if a layer is visible
b) If it is can you call one javascript function from within another (I already have a layer positioning function, so I may as well call it if possible.

here's my feeble attempt so far:

function adjustFrameButtons(){
      if (document.layers[IframeSearch].visibility = true){
            P7_Snap('IframeAnchor','IframeSearch',0,0);
      }
}

P7_Snap is the other function.

Also, perhaps I can sneek this in:
When things are positioned in Netscape they seem to be to the left by one pixel of where they should be.
Is there something I should know about this? Can this be corrected?
Avatar of Zvonko
Zvonko
Flag of North Macedonia image

Try this:

function adjustFrameButtons(){
    if (document.layers[IframeSearch].style.visibility == 'hide'){
         P7_Snap('IframeAnchor','IframeSearch',0,0);
    }
}

ASKER CERTIFIED SOLUTION
Avatar of Zvonko
Zvonko
Flag of North Macedonia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial