How to trigger Project Online/Sharepoint Online save button click from Javascript code

Hello Readers !

Thank you for reading.

In this blog, I’m gonna discuss on “How to call/trigger the ribbon save button click” using JavaScript. One of my friend came across this situation where he’s to create a button in the Project detail page, when user clicks the JavaScript button it should call/trigger the default save click.

The below code will trigger the save button click upon clicking the JavaScript button “Trigger Save“.

<input type="button" value="Trigger Save" id="btnCallSave" />

<script type="text/javascript">
    $("#btnCallSave").click(function () {

For some reason, .trigger(“click”) or .click() is not working. Only the plain JavaScript is working to trigger the save.

Tried the below but not working.

$(“#Ribbon\\.Tabs\\.PDP\\.Home\\.Project\\.Save-Large”).click();   and


Below is working.


Hope, it might help someone.