I am attempting to call a javascript function (residing in a js file) from an
applet to update a ProgressBar element. My method updateProgressBar() is located in data.Import.js and I include this file in the html page, which is why I dont understand why I am getting a "updateProgressBar function is undefined" error message. Is there some extra something Im supposed to put in the URL to let it know to look in my data.Import.js for the function?
In HTML:
<script src="data.Import.js" type="text/javascript">
In Applet:
I tried stuff like new URL("javascript:data.Import:updateProgressBar()"); but I got an invalid label error. I was also sure to put the MAYSCRIPT and scriptable parameters on my applet. My applet is setup as follows, and may be the cause of the function not found: initial applet class instantiates a
thread class, which then instantiates and runs my upload class. This upload class is what is needs to call the javascript function.
I have also tried using the LiveConnect methods such as:
But I haven't had any success with that either, as I get this error message in the
Java Console: "No such method "updateProgressBar" on JavaScript object" Previously, this main upload class opened a new window, so that may be causing it to have a different document/window object, but I am changing it so that it no longer opens a new window.
Any help would be greatly appreciated.