From: Kirkdorffer, Daniel <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Wednesday, May 12, 1999 3:07 PM
Subject: Re: calling bean-methods...


>Javascript communication to Java is only available with Netscape as far as
I
>know.


Technically, I've heard that the com.netscape.* javascript packages are also
in Internet Explorer, though this is not advertised!

>
>Dan
>
>> ----------
>> From:         Christopher Cobb[SMTP:[EMAIL PROTECTED]]
>> Reply To:     [EMAIL PROTECTED]
>> Sent:         Wednesday, May 12, 1999 2:17 PM
>> To:   [EMAIL PROTECTED]
>> Subject:      Re: calling bean-methods...
>>
>> <<File: ccobb.vcf>>
>> Brad Neuberg wrote:
>>
>> > On Wed, 12 May 1999, Tommy Berglund wrote:
>> >
>> > > I've got a problem and it would really help if someone could answer
>> it.
>> > > The problem is that I want to call a method in my bean when an event
>> is
>> > > triggered in my .jsp document. The code looks something like this...
>> > >
>> > > <USEBEAN name = "bean" type = "beans.bean" lifespan =
>> session></USEBEAN>
>> >
>> > This isn't part of the spec, but wouldn't it be nice to be able to
mimic
>> > JavaScript and add something like this to any html tag:
>> >
>> > <A HREF="somelink" jsp:onClick="bean.someMethod()">Look mah, a
link!</a>
>> >
>> > Damn that would be nice.... I think the JavaScript model of generalized
>> > event handlers (like onClick, onLoad, etc.) is a great model that
should
>> > be generalized to XML (so that you could onSomeEvent anything).  Is
this
>> > part of DOM Level 2?
>>
>> You *can* do this in JavaScript.  I'm not an expert at this, but you can
>> access java classes from JavaScript.  Try this in your java script:
>>
>> System.err.println("This is a test.");
>>
>> Then look in your Java Console.  You have just invoked a method on a Java
>> object.  You should be able to access your bean using the same JavaScript
>> syntax:
>>
>> com.package.path.MyBean.method();
>>
>> cc
>>
>>
>
>===========================================================================
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff JSP-INTEREST".  For general help, send email to
>[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to