• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to call two function in my button action?  RSS feed

 
saravanan sambandam
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

My requirement is i need to call two function on clicking of button event, requirement is below

#1. i have create webstart (java standalone) application which is included as a <a href=" . . . . . . ">. when the user clicked the link it get downloaded and run in client end and insert value in db. This is working fine. what we are doing we are passing user id as a parameter to webstart application. Webstart will check user id in db and if exist then will update the data into db.

while launching the application there is no control between webstart & my web application. So the user clicking other action on web page and saying their no result. We need to display overlay something.

#2. ones the webstart got launched, i need to use another call to check db, if the particular column updated in db, and fetch the data and display in the page instead of overlay.


I thing i am not making any confusion here.......

scenario

user page -----> button --->while clicking the button --> user information stored in db and pass the user id to webstart for further action.
here the user information stored in db and moving to next page. while moving to next page, web start action should be happened automatically. Problem is i unable to call webstart action.

How to implement the two action simultaneously..

please help me.

Thanks
saran
 
K. Tsang
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can't you have a method that calls the 2 actions? That way it can call both like you expect.

Is this done all inside java code? It looks nothing to do with HTML/CSS/JS.
 
Pramod Kumar Pandey
Ranch Hand
Posts: 52
Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
saravanan actually you cann't it just using js, because javascript is on client side and jsp is server side. So you can fullfil it with AJAX .
 
Campbell Ritchie
Marshal
Posts: 56536
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not a “beginning” topic: moving.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!