How to call JS from applet (Re: [Javascript] Help required.)

TomMallard mallard at serv.net
Wed May 15 10:00:00 CDT 2002


Have the onload event call a settimeout() function that keeps checking
whether the applets collection has members every second or so.

function checkApplets(){
	if(document.applets.length > 0){
		...code to execute...
	}else{
		checkLoading();
	}
}

function checkLoading(){
	var timer = settimeout(checkApplets(), 2000)
}

<body onload="checkLoading();">

HTH,

tom mallard
seattle

-----Original Message-----
From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On
Behalf Of David Merchant
Sent: Wednesday, May 15, 2002 7:23 AM
To: javascript at LaTech.edu
Subject: How to call JS from applet (Re: [Javascript] Help required.)


I changed the subject line to hopefully increase response to this.

This is a good question, I have not been able to figure out how to have a
JavaScript be called AFTER a particular Java applet is _fully_ downloaded.
Suprisingly, using the onLoad to call the JavaScript in question in the
<BODY> does not work, and apparently onLoad in the <APPLET> doesn't work
either. The applet takes varying times to fully download, the onLoad in the
<BODY> seems to ignore the applet, as long as the rest of the web page is
loaded it considers the page loaded enough to trigger the onLoad.

Murugan: posting your code in question (not as an attachment, the list is
not set up to easily take attachments because of too many viruses), will
help people answer your question.




At 09:04 PM 5/13/2002 +0530, you wrote:

>I am calling the applet class file in the html file using the applet tag.To
>view the file in the applet , i am calling the applet class inside the
>javascript.
>Basically this  javascript is being called at the end of the html
file.While
>accessing the html file,the applet is downloaded.But the file is not
>displaying.Beacuse the script is calling before the applet is downloaded.I
>want to find
>out the applet download completion using the javascript.So that i can call
>the javascript after the applet is downloaded.
>I set the time out in the javascript function to wait the script until the
>applet is downloaded. It doesn't solve the problem completly.Beauce time
out
>of the applet download varies depend up on the place.
>Basically i want to find out the applet download using JavaScript.Can you
>give me valid solution?
>
>
>"THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE
>ADDRESSEE and may contain confidential and privileged information.
>If the reader of this message is not the intended recipient,
>you are notified that any dissemination, distribution or copy of this
>communication is strictly Prohibited.
>If you have received this message by error, please notify us
>immediately, return the original mail to the sender and delete the
>message from your system."
>
>_______________________________________________
>Javascript mailing list
>Javascript at LaTech.edu
>https://lists.LaTech.edu/mailman/listinfo/javascript

Systems Librarian, Louisiana Tech University
merchant at latech.edu
JavaScript List Administrator (www.mountaindragon.com/javascript/)
Webmaster, HTML Encyclopedia (www.mountaindragon.com/html/)
Webmaster, Memorial Day Page (www.usmemorialday.org/)
Webmaster, Midori Ito Site (www.mountaindragon.com/midori/)

_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript




More information about the Javascript mailing list