Safari browser javascript problem

Discussion in 'JavaScript' started by rwcamera, Mar 29, 2007.

  1. #1
    The page appears when all the images are loaded, it works in all browsers less in SAFARI.

    <script language="javascript">
    <!--
    function precargar() {
    imgs = document.images;
    precargadas = true;
    for (var i = 0, total = imgs.length; i < total; i ++)
    precargadas = (precargadas && imgs.complete);
    if (precargadas) {document.body.style.visibility = "visible";}
    else setTimeout("precargar()", 100);
    }
    //-->
    </script>

    <body onload="precargar()" style="visibility:hidden;">
    </body>

    The problem can be in:
    Document.body.style? Safari does it refer otherwise to body?
    Thank you for attending my problem.
     
    rwcamera, Mar 29, 2007 IP