472,952 Members | 2,161 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,952 software developers and data experts.

getting rid of the applet grey box while loading

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
3 3214
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: doh..... | last post by:
I'm working on a windows 98 machine with the latest sun sdk. In summary there are two problems I get with appletviewer 1. The applet tries to open a socket to the wrong port 2. The proxy is...
3
by: Don | last post by:
Hi, I try to get a simple applet working, the class-file does load, but the image doesn't appear;( An error doesn't appear. The view is and stays 'grey' What I want: Automatic refresh of a...
1
by: polilop | last post by:
i have an java applet, and when i start it it shows a gray win with x. the console shows java.lang.NoClassDefFoundError: GeomApplet (wrong name: vj3/GeomApplet) at...
1
by: Don | last post by:
Hi, I try to get a simple applet working, the class-file does load, but the image doesn't appear;( An error doesn't appear. The view is and stays 'grey' What I want: Automatic refresh of a...
2
by: Mark Richards | last post by:
An applet on one of my pages uses a big picture as background. I want to load it before the applet and the rest of the html source. By doing this I want to avoid that the pane of the applet is...
0
by: speedcoder | last post by:
hi all, i'm stumped. my applet used to load images over the network. (it was actually designed by someone else.) yes, the applet used to load each image file independently over the network and...
1
by: ponvijaya | last post by:
Hi All, In My project, i am loading an applet in a HTML page using applet tag. And I am passing parameters to applet while loading the applet. In this project , this applet will do...
2
by: Richard Maher | last post by:
Hi, Can someone please tell me the strategy(ies) used by Java (the Security Manager or whatever) to determine if a given IP address conforms to the definition of the codebase from which an...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.