Loading ...
Sorry, an error occurred while loading the content.

calling applet function from javascript

Expand Messages
  • abhinav247
    I am getting error message as object doesnt support this method . thanx HTML code ------ function submit1() {
    Message 1 of 1 , Apr 1, 2002
    • 0 Attachment
      I am getting error message as
      "object doesnt support this method".

      thanx

      HTML code ------
      <html>
      <script language="javaScript">
      function submit1() {
      document.applet1.check("hi");
      document.matter.msg.value = document.applet1.getText
      ();
      }
      </script>
      <body>
      <APPLET name="applet1" CODE="applet1.class" WIDTH=463
      HEIGHT=315></APPLET>
      <form name="matter">
      <input type="text" name="msg" value="asdjklfh">
      <a href="javascript:submit1()">check</a>
      </body>
      </html>

      Applet code is ---------------------

      import java.awt.*;
      import java.applet.*;

      public class applet1 extends Applet {

      static String message = null;

      public void init(){
      System.out.println("initialised");
      }
      public void check(String mess){
      message = mess;
      }
      public String getText(){
      return message+"Accepted";
      }
      }
    Your message has been successfully submitted and would be delivered to recipients shortly.