# Java Error

**URL:** https://forum.kirupa.com/t/java-error/288327
**Category:** web dev
**Created:** [May 14, 2009, 9:32am UTC](https://forum.kirupa.com/t/java-error/288327 "2009-05-14T09:32:23Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![corbingeorgel](https://avatars.discourse-cdn.com/v4/letter/c/58956e/32.png) [@corbingeorgel](https://forum.kirupa.com/u/corbingeorgel)
#### Post date: [May 14, 2009, 9:32am UTC](https://forum.kirupa.com/t/java-error/288327/1 "2009-05-14T09:32:23Z")

</div>

Hello,

I’ve tried to invoke the public method of an applet as following:

\<applet id=“myApplet” …\>\</applet\>  
\<script\>  
var returnValue = myApplet.thePublicMethod();  
alert( returnValue );  
\</script\>

however, it seems doesn’t work??

I’m wondering if the pervious code fragment is actually the right way to invoke the desired method? If not, how to accomplish the task?

OS: Windows2000  
Browser: MSIE6  
Plug-in: Java Plug-in 1.3.1\_01 (enabled)

Thanks for any help.  
[http://gojijuiceinfo.org/blog/](http://gojijuiceinfo.org/blog/)
