Re: calling a javascript function from my java class

2007-09-06 Thread Session A Mwamufiya
Thanks for the overview Frank. I'm using struts 2 and will lookup how to writeup AJAX requests to get this done. Thanks a bunch, Session > Is this Struts1 or Struts2? That will (potentially) change the mechanics > a little, but in theory, sure, it's easy to do. Assume Struts1 for a > moment.

Re: calling a javascript function from my java class

2007-09-06 Thread Frank W. Zammetti
Is this Struts1 or Struts2? That will (potentially) change the mechanics a little, but in theory, sure, it's easy to do. Assume Struts1 for a moment... 1. User triggers event on the page that does the delete. This causes a Javascript function to be executed. 2. That function makes an AJAX

Re: calling a javascript function from my java class

2007-09-06 Thread Session A Mwamufiya
Hi Chris, Thanks for the response. I'm really a beginner with ajax/Dojo/Dom tree, and I have no idea how the tree could be returned from the server. Would you have an example resource that you could point me to that would show this? Or would you be able to send me some code snippets if the p

Re: calling a javascript function from my java class

2007-09-06 Thread Session A Mwamufiya
The jsp page sends a delete request to the struts action that determines whether or not the object associated with the node can be deleted from the database. The struts action removes the object from the database if all is well, and at this point, I would like to have the struts action notify t

Re: calling a javascript function from my java class

2007-09-06 Thread Dave Newton
3. Generate JavaScript in the Ajax result that removes the node (and re-renders the tree if necessary; I don't know how all that works) and execute it. --- Chris Pratt <[EMAIL PROTECTED]> wrote: > You can use the Rhino JavaScript interpreter to > execute JavaScript > from Java, but I don't think

Re: calling a javascript function from my java class

2007-09-06 Thread Chris Pratt
You can use the Rhino JavaScript interpreter to execute JavaScript from Java, but I don't think that's actually what you are looking for. It sounds like you are asking "How to I run some JavaScript in the client's browser when something changes on the server?" And the short answer is, you can't.