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.  At least not directly.

Remember, the web uses a Request/Response model where the Browser
makes a request and the server returns a response, so there is no
simple way for the server to initiate something happening in the
browser.

Two options I can see are:

1. Have the browser make an AJAX request and the server can return the
new DOM tree without the removed node

2. Have the browser resubmit the request and the new page can be built
without the removed node.

(*Chris*)

On 9/6/07, Session A Mwamufiya <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Does anyone have an example of how to call a javascript function from a java 
> class?  I want to call a javascript function that removes a node from a tree 
> after a java class removed it from the database.
>
> Thanks,
> Session
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to