求指导怎样在一个button按钮里面调用两个js方法,第一个没有执行完,第二个不允许执行。

function MustWrite(){
var a = document.getElementById("stopReason").value;
if(a==""){
alert("必填项,请重新输入");
return false;
}

function stopProtocol(){
//if(confirm("是否终止协议?")==true)
//{
var timeOut = 1000*60*20;//20分钟
var step = 3;
var state = 9;
var stopReason = document.stop.stopReason.value;
jQuery().wiwjAjax({
url:"/5i5j/Business/ContractProtocol/ChangeStepDo.5i5j",
data:{"id":${request.id},"state":state,"step":step,"stopReason":stopReason},
isuseDefined:false,
debug:false,
timeout:timeOut,
success:function(data,obj){
if(obj['code']==="1"){
alert("操作成功");
}else{
alert("操作失败!");
}
parent.PageNext("${Root.page}");
},
start:function(){
$("#passButton").attr("disabled","disabled");
$("#updateButton").attr("disabled","disabled");
$("#endButton").attr("disabled","disabled");
$("#endChangeButton").attr("disabled","disabled");
},
end:function(){

}
});
//}
} ;

}

 <input type="button" value="确认" onclick="MustWrite();stopProtocol()">


 我这有两个js方法,怎样在一个button按钮里面调用两个js方法,第一个没有执行完,第二个不允许执行。

function a()
{
MustWrite();
stopProtocol();
}

function a()
{
MustWrite();
stopProtocol();
}

用settimeout函数,加在一个方法末端,让另一个方法过指定的时间都再执行

在写一个方法
function fun(){
if(MustWrite()){

stopProtocol();
}

}