Hi,
Alert takes one parameter only(String types). You have given two . I think
you intended to do alert("Mon"+strMon) then alert("Mon",strMon)
and yeah , the return value can be handled by javascript.

Ashwani
> ----------
> From:         Ravi Pritmani
> Reply To:     Ravi Pritmani
> Sent:         Saturday, February 26, 2000 11:41 AM
> To:   [EMAIL PROTECTED]
> Subject:      Re: [Java in javscript]
>
> There is something wrong with your code. Just replace alert("mon",strMon);
> with alert("mon"+strMon); and it would work.Take care that all your
> variables
> and methods in your applet should be public.
> Ravi
>
>
> meera nayak <[EMAIL PROTECTED]> wrote:
> Hi room,
>             I am doing something like this .Trying to call a method in a
> java class from javascript.It returns a string .But how does javascript
> handle it.Can it handle a parameter returned from the java method.Can it
> store it in a variable.
>
> source code
> <html>
> <head>
> <script>
> var strMon;
>  function getMon(){
>   strMon=document.test.getMonth();
>   alert("mon",strMon);
> }
> </script>
> </head>
> <body>
> <applet name="test" code="rob.class" width=1 height=1>
> </applet>
> <form>
> <input type=text name=textfield1 value="">
> <input type=button onclick="getMon();">
> <form>
> </body>
> <html>
>
> Can anyone help
>
> Thanx in advance
> Meera
>
> ==========================================================================
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>
>
> ____________________________________________________________________
> Get free email and a permanent address at http://www.netaddress.com/?N=1
>
> ==========================================================================
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>

===========================================================================
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