DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   JSP (http://www.daniweb.com/forums/forum24.html)
-   -   how to call javabean from jsp page upon onChange event (http://www.daniweb.com/forums/thread31376.html)

tllcll Aug 29th, 2005 6:33 am
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

shyamNambiar Oct 24th, 2005 8:12 am
Re: how to call javabean from jsp page upon onChange event
 
cal ur jsp using a javascript ,cal that script upon onChange u can write ur bean cals in that JSP

xchen Nov 8th, 2005 3:19 pm
Re: how to call javabean from jsp page upon onChange event
 
Quote:

Originally Posted by shyamNambiar
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?

shyamNambiar Nov 10th, 2005 2:28 am
Re: how to call javabean from jsp page upon onChange event
 
onChange="javascript: return calBeanFucntion('yourJsp.jsp');

marcfont Jan 5th, 2006 5:22 am
Re: how to call javabean from jsp page upon onChange event
 
Quote:

Originally Posted by shyamNambiar
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!

jwenting Jan 6th, 2006 7:06 am
Re: how to call javabean from jsp page upon onChange event
 
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.


All times are GMT -4. The time now is 8:51 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC