Hi Anthony,

     Did you try this in Internet Explorer?

Thanks
K.V. Srinivas Kumar




"Kelly, Anthony, CTR, OUSDP/PAD-SD" <[EMAIL PROTECTED]> on
03/10/2000 12:29:40 AM

To:   Srinivas Kumar Krishna Vajjala/BS1/SGSSDI/SONYASIA
cc:
Subject:




I went back to test your code with some modifications:

Applet code

/*
 * ClassName.java
 *
 * Created on March 9, 2000, 11:09 AM
 */

package package1;

/**
 *
 * @author  kellya
 * @version
 */
public class ClassName extends java.applet.Applet {

  /** Initializes the applet ClassName */
  public void init () {
    initComponents ();
  }

  /** This method is called from within the init() method to
   * initialize the form.
   * WARNING: Do NOT modify this code. The content of this method is
   * always regenerated by the FormEditor.
   */
  private void initComponents () {
    setLayout (new java.awt.BorderLayout ());

  }


  // Variables declaration - do not modify
  // End of variables declaration

  public String getMonth() {
    return "HELLO!!! I am from Applet";
  }

}


Htm Code:

 <html>
 <head>
 <script language="javascript">
 var strMon;
  function getMon(){
   strMon=document.test.getMonth();
   alert("mon" + strMon);
 }
 </script>
 </head>
 <body>
 <applet name="test" code="ClassName.class" width=1 height=1>
 </applet>
 <form name="myform">
 <input type=text name=textfield1 value="">
 <input type=button onclick="getMon()" value="Print">
 <form>
 </body>

When I started the page and cliked on the button, it worked like a charm...

Enjoyed working with you,
Anthony

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
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