0

Hi,
I would like to find out how to call javabean from jsp page with passing values upon onChange event. Pls provide example if possible

5
Contributors
5
Replies
6
Views
11 Years
Discussion Span
Last Post by jwenting
0

cal ur jsp using a javascript ,cal that script upon onChange u can write ur bean cals in that JSP

Can you give a simple example?

0

onChange="javascript: return calBeanFucntion('yourJsp.jsp');

He there!

Shyam I can't see what are you trying to do. Which code do you plan to place in the function "calBeanFunction()"?

In my case, what I need to do is execute a JavaBean each time I catch a Javascript event and I'm really lost to do so. Could you please give a bit of light, please?

Cheers!

0

You can't execute Java code from a Javascript function directly.
All you can do is have the Javascript generate an Http request to a servlet which can execute the Java code for you and optionally return something which your Javascript could then use to generate content for your page.

It is tricky, but it can be done. Can't tell you how we solved it as the code is not mine to give away.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.