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?
>
I can think of at least one reason it's not there -- JavaScript event handlers
execute inside your client (usually a web browser), whereas the JSP beans live
inside the server. How would bean.someMethod() get called?
Craig McClanahan
===========================================================================
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".