Javascript sample to update ticket (webservices)

Hi Experts,

I need a favor please. 
We have a requirement to integrate HPSM with another Service Desk system through web services.

From our side, whenever we update the ticket in HPSM, the journal updates & the status and some other fields should be updated in the other system.

Does anyone have a sample javascript to update tickets using webservices (from HPSM to another system)?