473,322 Members | 1,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 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 3232
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: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.