943,935 Members | Top Members by Rank

Ad:
  • JSP Discussion Thread
  • Unsolved
  • Views: 17541
  • JSP RSS
Aug 29th, 2005
0

how to call javabean from jsp page upon onChange event

Expand Post »
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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
tllcll is offline Offline
10 posts
since Aug 2005
Oct 24th, 2005
0

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
shyamNambiar is offline Offline
9 posts
since Oct 2005
Nov 8th, 2005
0

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?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
xchen is offline Offline
1 posts
since Nov 2005
Nov 10th, 2005
0

Re: how to call javabean from jsp page upon onChange event

onChange="javascript: return calBeanFucntion('yourJsp.jsp');
Reputation Points: 10
Solved Threads: 0
Newbie Poster
shyamNambiar is offline Offline
9 posts
since Oct 2005
Jan 5th, 2006
0

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!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
marcfont is offline Offline
1 posts
since Jan 2006
Jan 6th, 2006
0

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.
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JSP Forum Timeline: want to know more about jsp
Next Thread in JSP Forum Timeline: need help





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC