954,574 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

how to call javabean from jsp page upon onChange event

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

tllcll
Newbie Poster
10 posts since Aug 2005
Reputation Points: 10
Solved Threads: 0
 

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

shyamNambiar
Newbie Poster
9 posts since Oct 2005
Reputation Points: 10
Solved Threads: 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?

xchen
Newbie Poster
1 post since Nov 2005
Reputation Points: 10
Solved Threads: 0
 

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

shyamNambiar
Newbie Poster
9 posts since Oct 2005
Reputation Points: 10
Solved Threads: 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!

marcfont
Newbie Poster
1 post since Jan 2006
Reputation Points: 10
Solved Threads: 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.

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You