By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,321 Members | 1,875 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,321 IT Pros & Developers. It's quick & easy.

getting rid of the applet grey box while loading

P: n/a
Hello all , thanks in advance for any help. While looking for a solution to how to replace the grey box while an applet loads, a search of Google got me an article by Glenn s. Peffers that claims to solve the problem.
You can find the article at http://www.codeproject.com/java/javaappletwaitmsg.asp
I have adapted the code to my situation but can't get it to work. Maybe someone has an idea how to fix it... Here is the code

Cheers,

Jacques
<!doctype html public "-//W3C//DTD HTML 4.0 transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="keywords" content="Pump Training">
<meta name="description" content="Pump Training">
<meta http-equiv="refresh" content="3600">
<meta name="copyright" CONTENT="(c) 2003, Fluide Design Inc.">
<title>Fluide Design Inc. - Calculate N.P.S.H.A applet </title>

<style type="text/css" media="screen">@import "/fluide1.css";</style>

<SCRIPT type="TEXT/JAVASCRIPT" language="JAVASCRIPT">
<!--
defaultStatus="FluideDesign.com - Pump training, consulting and information for process industries"
// -->
</SCRIPT>

<SCRIPT language=JavaScript src="milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
</script>
<SCRIPT language=JavaScript src="/menu_data.js" type=text/javascript></SCRIPT>
</head>

<script language="JavaScript">

function init()
{
if (document.all)
{
document.all.loading.style.visibility="hidden";
document.all.myapplet.style.visibility="visible";
document.applets[0].repaint();
}
else
{
document.loading.visibility="hide";
document.myapplet.visibility="visible";
}
}

</script>
<style type="text/css">

#loading {
position:absolute;
left:350;
top:150;
}

#myapplet {
position:absolute;
left:350;
top:150;
visibility:hide;
}

</style>

<body onLoad="init()">

<div id="loading">
<p>Please wait while Java applet loads...</p>
</div>

<div id="myapplet" style="visibility:hidden">
<applet
code = "cavitationtab.Cavitation.class"
name = "N.P.S.H.A. Calculator"
width = "400"
height = "300"
hspace = "0"
vspace = "0"
align = "middle".
<param name = language value = E >
<p>Requires a browser that supports Java.</p>
</applet>
</div>

<div id="content">

<h1>CALCULATE N.P.S.H.A.</h1>
</div>
</body>
</html>


Jul 23 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Got it, it seems that the div loading and div myapplet has to follow immediately the onLoad event.

Jacques

"Jacques Chaurette" <ja***************@sympatico.ca> wrote in message news:CK********************@news20.bellglobal.com. ..
Hello all , thanks in advance for any help. While looking for a solution to how to replace the grey box while an applet loads, a search of Google got me an article by Glenn s. Peffers that claims to solve the problem.
You can find the article at http://www.codeproject.com/java/javaappletwaitmsg.asp
I have adapted the code to my situation but can't get it to work. Maybe someone has an idea how to fix it... Here is the code

Cheers,

Jacques
<!doctype html public "-//W3C//DTD HTML 4.0 transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="keywords" content="Pump Training">
<meta name="description" content="Pump Training">
<meta http-equiv="refresh" content="3600">
<meta name="copyright" CONTENT="(c) 2003, Fluide Design Inc.">
<title>Fluide Design Inc. - Calculate N.P.S.H.A applet </title>

<style type="text/css" media="screen">@import "/fluide1.css";</style>

<SCRIPT type="TEXT/JAVASCRIPT" language="JAVASCRIPT">
<!--
defaultStatus="FluideDesign.com - Pump training, consulting and information for process industries"
// -->
</SCRIPT>

<SCRIPT language=JavaScript src="milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
</script>
<SCRIPT language=JavaScript src="/menu_data.js" type=text/javascript></SCRIPT>
</head>

<script language="JavaScript">

function init()
{
if (document.all)
{
document.all.loading.style.visibility="hidden";
document.all.myapplet.style.visibility="visible";
document.applets[0].repaint();
}
else
{
document.loading.visibility="hide";
document.myapplet.visibility="visible";
}
}

</script>
<style type="text/css">

#loading {
position:absolute;
left:350;
top:150;
}

#myapplet {
position:absolute;
left:350;
top:150;
visibility:hide;
}

</style>

<body onLoad="init()">

<div id="loading">
<p>Please wait while Java applet loads...</p>
</div>

<div id="myapplet" style="visibility:hidden">
<applet
code = "cavitationtab.Cavitation.class"
name = "N.P.S.H.A. Calculator"
width = "400"
height = "300"
hspace = "0"
vspace = "0"
align = "middle".
<param name = language value = E >
<p>Requires a browser that supports Java.</p>
</applet>
</div>

<div id="content">

<h1>CALCULATE N.P.S.H.A.</h1>
</div>
</body>
</html>


Jul 23 '05 #2

P: n/a
On Wed, 3 Nov 2004 10:42:34 -0500, Jacques Chaurette wrote:
Got it,


I hope that you can 'get' the fact that there was no need to
repost 268 lines of your earlier message to add two lines of
'Got it..'.

<http://www.physci.org/rfc/rfc1855.jsp#3_1_3>, nNote particularly
point 2, "..Content of a follow-up post should exceed quoted content."

Please locate and make effective use of the appropriate key,
<http://www.physci.org/kbd.jsp?key=del>

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
Jul 23 '05 #3

P: n/a
yeah, thanks for your help, got it!

"Andrew Thompson" <Se********@www.invalid> wrote in message
news:11****************************@40tude.net...
On Wed, 3 Nov 2004 10:42:34 -0500, Jacques Chaurette wrote:
Got it,


I hope that you can 'get' the fact that there was no need to
repost 268 lines of your earlier message to add two lines of
'Got it..'.

<http://www.physci.org/rfc/rfc1855.jsp#3_1_3>, nNote particularly
point 2, "..Content of a follow-up post should exceed quoted content."

Please locate and make effective use of the appropriate key,
<http://www.physci.org/kbd.jsp?key=del>

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane

Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.