View Complete Thread | FoxWeb Forum Home
Search:
Date:    Msg ID:   
From:    Thread:   
Subject:   
 
I'm using DHTML to display a "please wait" splash screen while the browser is receiving the data.   I've just cut & pasted a code found on the Internet, I'm not a Java specialist.
 

Code in the html head :
 
 <SCRIPT LANGUAGE="JavaScript">
  // This script is intended for use with a minimum of Netscape 4 or IE 4.
  if(document.layers) {
   var ns4 = true;
   }
  if(document.all) {
   var ie4 = true;
   }
  function showObject(obj) {
   if (ns4) {
    obj.visibility = "show";
    }
   else if (ie4) {
    obj.visibility = "visible";
    }
   }
  function hideObject(obj) {
   if (ns4) {
    obj.visibility = "hide";
    }
   if (ie4) {
    obj.visibility = "hidden";
    }
   }
 </SCRIPT>

Code just at the beginning of the body, displaying the message contained in a variable, and an animation :
 
 <DIV ID="splashScreen" STYLE="position:absolute;z-index:5;top:30%;left:35%;">
  <TABLE BGCOLOR="#000000" BORDER=1 BORDERCOLOR="#000000" CELLPADDING=0 CELLSPACING=0 HEIGHT=200 WIDTH=300>
   <TR>
    <TD WIDTH="100%" HEIGHT="100%" BGCOLOR="#CCCCCC" ALIGN="CENTER" VALIGN="MIDDLE">
     <BR> &nbsp; &nbsp;
     <FONT FACE="Helvetica,Verdana,Arial" SIZE=3 COLOR="#000066"><B><%=gcLibAttendez%></B></FONT>
     &nbsp; &nbsp; <BR> <br>
     <IMG SRC="images/gears.gif" BORDER=0>
     <BR><BR>
    </TD>
   </TR>
  </TABLE>
 </DIV>

And the code at the bottom of the body :
 
 <SCRIPT LANGUAGE="JavaScript">
 if(ns4) {
  var splash = document.splashScreen;
  }
 else if(ie4) {
  var splash = document.all.splashScreen.style;
  }
 hideObject(splash);
 </SCRIPT>

It works fine with Internet Explorer 5.x.    The splash screen is hidden after the page is loaded in the browser.
But it doesn't work with Netscape 6.2.3 and 7 : the splash screen remains in front of the data displayed.
 
Any idea ?
Thanks by advance
JoŽl.