Saving a document with custom script client side

Is it possible to send a “save” command within a client side custom script? This would be equivalent of the user clicking/tapping the big purple save button in a form.

This should help -

Thanks! For hosted accounts, the client side script should be;

instead of the;

indicated in the documentation. Not sure why; is the documentation intended for server side changes in the JS files?