Actively call a JavaScript from a Applet.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Roberto Gallo

    Actively call a JavaScript from a Applet.


    Hi everyone;


    * How can I actively call a Javascript function from inside a Applet?

    * What would be a good messaging system among some Applets inside the
    same page?

    Thank you very much.
    Roberto.



  • Randy Webb

    #2
    Re: Actively call a JavaScript from a Applet.

    Roberto Gallo wrote:
    [color=blue]
    > Hi everyone;
    >
    >
    > * How can I actively call a Javascript function from inside a Applet?[/color]

    Ask in comp.lang.java
    java != javascript
    [color=blue]
    > * What would be a good messaging system among some Applets inside the
    > same page?
    >[/color]

    Ask in comp.lang.java
    java != javascript


    --
    Randy
    Chance Favors The Prepared Mind
    comp.lang.javas cript FAQ - http://jibbering.com/faq/

    Comment

    • Lasse Reichstein Nielsen

      #3
      Re: Actively call a JavaScript from a Applet.

      Randy Webb <hikksnotathome @aol.com> writes:
      [color=blue]
      > Ask in comp.lang.java
      > java != javascript[/color]

      I think the original poster knows that well enough, when he wants to
      call a Javascript function from inside the applet.

      That said, I think the solution will be in Java, so asking in a Java
      group could be better.

      Netscape's solution for Javascript/Java interaction is called
      LiveConnect (the original name for JavaScript was LiveScript, and I
      don't think it is a coincidence).

      <URL:http://developer.netscape.com/docs/t...#Communicating with JavaScript from>

      So, to call the Javascript alert function, do:

      JSObject window = netscape.javasc ript.JSObject.g etWindow();
      window.call("al ert",new Object[]{"Test"});

      I don't know if it will work in IE, or with the MS-"JVM".
      [color=blue][color=green]
      >> * What would be a good messaging system among some Applets inside the
      >> same page?[/color][/color]

      I don't know if there is anything better, but you can use LiveConnect,
      if permissions on the browser allows it.

      /L
      --
      Lasse Reichstein Nielsen - lrn@hotpop.com
      DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
      'Faith without judgement merely degrades the spirit divine.'

      Comment

      • Laurent Bugnion

        #4
        Re: Actively call a JavaScript from a Applet.

        Hi,

        Roberto Gallo wrote:[color=blue]
        > Hi everyone;
        >
        >
        > * How can I actively call a Javascript function from inside a Applet?[/color]

        See

        [color=blue]
        > * What would be a good messaging system among some Applets inside the
        > same page?[/color]

        See

        [color=blue]
        >
        > Thank you very much.
        > Roberto.[/color]

        Laurent
        --
        Laurent Bugnion, GalaSoft
        Software engineering: http://www.galasoft-LB.ch
        Private/Malaysia: http://mypage.bluewin.ch/lbugnion
        Support children in Calcutta: http://www.calcutta-espoir.ch

        Comment

        Working...