Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Javascript-Java


  • From: raaj.mishra@xxxxxxxxxxxxx (Rajendra Mishra)
  • Subject: Javascript-Java
  • Date: Sat, 30 Oct 1999 21:39:52 -0400

Hi,

    Communication from Javascript to Java does not work with the JDK1.2 plug
in. I would be happy if somebody can prove me wrong.

    I was able to call the Javascript fn only if I am using the
1. 1.0.3 Swing package names &
2. Using the <applet> tag.

    It doesn;t work with the 1.2 plug-in(<object tag>) and/or if I am using
the new 1.1 Swing packages. MAYSCRIPT doesn't make a difference. I believe
it is necessary only if we have a Java to Javascript comm using the netscape
classes.

    Anybody has called a Javascrpt from Java using the 1.2 plug-in and the
new JDK1.2?

Thanks.
Raaj.




----- Original Message -----
From: Robert B. Weeks <vaiism@xxxxxxxxxxx>
To: Rajendra Mishra <raaj.mishra@xxxxxxxxxxxxx>; Mishkin, Ernest
<ernest.Mishkin@xxxxxxxxx>
Cc: <advanced-java@xxxxxxxxxxxxxxxx>
Sent: Saturday, October 30, 1999 1:08 AM
Subject: Re: Javascript-Java


> Hello -
>
> > Also, here is the cde where i am calling the java fn from javascript. I
> > tried using Applet instead of JApplet but it doesn;t work("object oes
not
> > support property/method" error). It works fine if the base class is
applet.
> > Any help here would be appreciated.
> > Raaj.
> >
> >
> > HTML code
> >
> > <HTML>
> > <HEAD>
> > <TITLE>Autogenerated HTML</TITLE>
> > <SCRIPT LANGUAGE="JavaScript">
> > <!--
> > function someFunc()
> > {
> > alert()
> > document.applets.oneapplet.SomeFunc()
> > }
> > file://-->
> > </SCRIPT>
> >
> > </HEAD>
> > <BODY onLoad="javascript:someFunc()">
> > <APPLET name = "oneapplet" CODE="Applet1.class" WIDTH=426
> > HEIGHT=266></APPLET>
> > </BODY>
> > </HTML>
>
> Have you tried using the applets array instead of the applets. ?
>
> document.applets['oneapplet'].myMethod();
>
> or
>
> document.applets[0].mymethod();
>
>
> Also make sure that you have MAYSCRIPT in your applet tag as well:
>     <APPLET
>         name = "oneapplet"
>         CODE="Applet1.class"
>         WIDTH=426
>         HEIGHT=266
>         MAYSCRIPT>
>     </APPLET>
>
> Hope this is what you were looking for...
>
>
> Also - you don't need the term 'javascript:' on the onload - it is just
like
> any other event - just call the function:
>     <body onLoad="someFunction();">
>
>
> --
> Robert B. Weeks                        Software Engineer
> Sun Microsystems, Solaris              Phone: 1.650.786.4276
> 901 San Antonio Rd. UMPK17-304         rweeks@xxxxxxxxxxx
> Palo Alto, CA 94043                    vaiism@xxxxxxxxxx
>
>
>
>
>
>
>
>
> ---
> To unsubscribe, mail advanced-java-unsubscribe@xxxxxxxxxxxxxxxx
> To get help, mail advanced-java-help@xxxxxxxxxxxxxxxx
>


---
To unsubscribe, mail advanced-java-unsubscribe@xxxxxxxxxxxxxxxx
To get help, mail advanced-java-help@xxxxxxxxxxxxxxxx