Hello:
 Now I encounter a problem about applet invoking javascript�s method.
 There are 2 files in attached files : winApp.java, test.htm.
 In IE and netscape4.7, the applet(winApp.java) can invoke javascript�s method of 
test.htm by using JSObject.call().But  netscape6 can�t do so.
 netscape.javascript. JSObject

if you want compile winApp.java again,pls set java40.jar into your classpath.
java40.jar often lies in netscape folder in your computer(netscape 4.7).
Eg:  D:\Program Files\Netscape\Communicator\Program\java\classes\java40.jar

Thank you.

//=========winApp.java===========================================

import java.applet.*;
import netscape.javascript.*;

public class winApp extends Applet{


   public void init(){
      JSObject win = JSObject.getWindow(this);
      String arg[] = {""};
      win.call("changeOrder",arg);
   }

}
//=============test.html===========================
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<script language="javascript">
function changeOrder(){
 alert("ok");
}
</script>
<TITLE></TITLE>
</HEAD>
<BODY>

<P>
<applet code="winApp.class" name="winApp" width="126" height="18" MAYSCRIPT VIEWASTEXT>
</applet>
</P>

</BODY>
</HTML>

//===============End============================

Herbert

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to