On January 27th, this site will be read-only as we migrate to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 30th, when you will be able to use this site as normal.

    Forum Stats

  • 3,889,532 Users
  • 2,269,755 Discussions
  • 7,916,774 Comments

Discussions

how can i call applet method using java script

843807
843807 Member Posts: 46,582
edited Sep 25, 2002 8:13AM in Java Applet Development
hi all
I know how to call applet method using java script simply
but if I have to call applet method in package from java script, which has init()
method its inside(I mean main class...)
is there some tip or method to solve this problem?
what I did was just calling applet method in package like

document.package.subpackage.MyAppl.myMethod()

there is an error in java script
it might be null or no method found in your script
so I want to know there are some methods or tips solving this problem
I am looking forward to your answer
have a nice day...

Comments

  • 796365
    796365 Member Posts: 8,041
    Don't know the answer, this might have some info:
    http://java.sun.com/j2se/1.4.1/docs/guide/plugin/developer_guide/js_java.html

    Also see chapter 24 for the other direction.
  • 843807
    843807 Member Posts: 46,582
    You must add following attributes to APPLET tag(mayscript, scriptable):

    <applet
    codebase = "."
    code = "namingspart.Applet.class"
    width = "620"
    height = "500"
    hspace = "0"
    vspace = "0"
    align = "top"
    name="namingsPartApplet"
    id="namingsPartApplet"

    mayscript="true"
    scriptable="true">

    <param name="initLine" value="">
    </applet>



    ================================
    Sincerely,
    Melnikov V
    AlarIT programmer
    http://www.AlarIT.com
    ================================
This discussion has been closed.