zoom problem in FF, working in IE

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • muisjepiep
    New Member
    • Feb 2006
    • 1

    zoom problem in FF, working in IE

    hey

    this code works in IE but not in FF

    [CODE=javascript]function ZoomFrames(obj)
    {
    if (isVisibleObjec t(document.getE lementById("FRH EAD").style))
    {
    document.getEle mentById("FRZOO M").src='ima ges/zoomin.gif';
    hideObject(docu ment.getElement ById("FRHEAD"). style);
    hideObject(docu ment.getElement ById("FRINDEX") .style)
    }
    else
    {
    document.getEle mentById("FRZOO M").src='ima ges/zoomout.gif';
    showObject(docu ment.getElement ById("FRHEAD"). style);
    showObject(docu ment.getElement ById("FRINDEX") .style)
    }
    }

    ns4 = (document.layer s)? true:false
    ie4 = (document.all)? true:false

    function showObject(obj)
    {
    if (ns4) obj.visibility = "show"
    else if (ie4) obj.display="bl ock"
    }

    function hideObject(obj)
    {
    if (ns4) obj.visibility = "hide"
    else if (ie4) obj.display="no ne"
    }[/CODE]

    does anybody has an idea?
    Last edited by muisjepiep; Feb 9 '06, 02:46 PM.
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Firefox doesn't support either document.layers or document.all.

    If you don't need to support Netscape 4, just set the display property instead for all modern-ish browsers.

    Comment

    Working...