Applet - Javascript communication

Discussion in 'Javascript' started by Roberto Gallo, Jan 16, 2004.

  1. Hi again. Thank you for previews answers.

    I have another question.... How can I inform a Javascipt, that must
    submit my Applet's data, that this same Applet has produced the data in
    question?
    Or in other words, is there any way to call a JavaScript junction within
    the Applet? Is it the best way?
    What do you suggest?

    Thank you very much again,

    Roberto Gallo.
    Roberto Gallo, Jan 16, 2004
    #1
    1. Advertising

  2. "Roberto Gallo" <> wrote in message
    news:bu9fit$h4g$...
    > Hi again. Thank you for previews answers.
    >
    > I have another question.... How can I inform a Javascipt, that must
    > submit my Applet's data, that this same Applet has produced the data in
    > question?
    > Or in other words, is there any way to call a JavaScript junction

    within
    > the Applet? Is it the best way?
    > What do you suggest?
    >
    > Thank you very much again,
    >
    > Roberto Gallo.
    >
    >
    >
    >


    Hello Robert,

    You need a Netscape JAR file name java40.jar to compile the next code but
    when running in a browser the referred classes are supplied by the
    environment.

    public Object callJS(String jsCode)
    {
    JSObject window = JSObject.getWindow(appletInstance);
    window.eval(jsCode);
    }

    Regards,

    Silvio Bierman
    Silvio Bierman, Jan 17, 2004
    #2
    1. Advertising

  3. "Silvio Bierman" <> wrote in message
    news:4008a4da$0$324$4all.nl...
    >
    > "Roberto Gallo" <> wrote in message
    > news:bu9fit$h4g$...
    > > Hi again. Thank you for previews answers.
    > >
    > > I have another question.... How can I inform a Javascipt, that must
    > > submit my Applet's data, that this same Applet has produced the data in
    > > question?
    > > Or in other words, is there any way to call a JavaScript junction

    > within
    > > the Applet? Is it the best way?
    > > What do you suggest?
    > >
    > > Thank you very much again,
    > >
    > > Roberto Gallo.
    > >
    > >
    > >
    > >

    >
    > Hello Robert,
    >
    > You need a Netscape JAR file name java40.jar to compile the next code but
    > when running in a browser the referred classes are supplied by the
    > environment.
    >
    > public Object callJS(String jsCode)
    > {
    > JSObject window = JSObject.getWindow(appletInstance);
    > window.eval(jsCode);
    > }
    >
    > Regards,
    >
    > Silvio Bierman
    >
    >


    typo: the last statement should be

    return window.eval(jsCode);
    Silvio Bierman, Jan 17, 2004
    #3
  4. Thank you very much

    "Silvio Bierman" <> wrote in message
    news:40098227$0$320$4all.nl...
    >
    > "Silvio Bierman" <> wrote in message
    > news:4008a4da$0$324$4all.nl...
    > >
    > > "Roberto Gallo" <> wrote in message
    > > news:bu9fit$h4g$...
    > > > Hi again. Thank you for previews answers.
    > > >
    > > > I have another question.... How can I inform a Javascipt, that

    must
    > > > submit my Applet's data, that this same Applet has produced the data

    in
    > > > question?
    > > > Or in other words, is there any way to call a JavaScript junction

    > > within
    > > > the Applet? Is it the best way?
    > > > What do you suggest?
    > > >
    > > > Thank you very much again,
    > > >
    > > > Roberto Gallo.
    > > >
    > > >
    > > >
    > > >

    > >
    > > Hello Robert,
    > >
    > > You need a Netscape JAR file name java40.jar to compile the next code

    but
    > > when running in a browser the referred classes are supplied by the
    > > environment.
    > >
    > > public Object callJS(String jsCode)
    > > {
    > > JSObject window = JSObject.getWindow(appletInstance);
    > > window.eval(jsCode);
    > > }
    > >
    > > Regards,
    > >
    > > Silvio Bierman
    > >
    > >

    >
    > typo: the last statement should be
    >
    > return window.eval(jsCode);
    >
    >
    Roberto Gallo, Jan 18, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jade
    Replies:
    3
    Views:
    924
    Roedy Green
    Aug 14, 2003
  2. Rune Andresen
    Replies:
    2
    Views:
    1,931
    Phil Powell
    Sep 17, 2003
  3. Paul Richards

    Applet to Javascript communication

    Paul Richards, Sep 25, 2003, in forum: Java
    Replies:
    0
    Views:
    436
    Paul Richards
    Sep 25, 2003
  4. Your Name

    Applet to Applet Communication

    Your Name, Nov 3, 2003, in forum: Java
    Replies:
    0
    Views:
    390
    Your Name
    Nov 3, 2003
  5. Replies:
    2
    Views:
    4,687
Loading...

Share This Page