call sc_ajax_javascript from a button type php

hi, i have a form and i have a button type php, in this button i valide some information, and i need save changes too.
so i created a function ‘savechanges’ javascript for that:

nm_atualiza(‘alterar’);
return true;

this function i call it from my button php: sc_ajax_javascript(‘savechanges’);

but, it do not works.

or wich is the way correct for do it?

Thanks you.