I was very depressed and still didn’t give up. I read the introduced method from beginning to end. When I saw doHandler, there were two parameters sign and autoClose. After reading the method introduction, I felt that this method was feasible (I had always used it before). ymPrompt.close method to directly close the child window), I wrote a script to test it, and it can achieve what I want. I will post the code as follows:
Parent window code:
function viewSubFeeDetail(feeId)
{
ymPrompt.win({message:'viewSubFeeDetail. action?feeId=' feeId,handler:callBack,width:800,height:400,title:'Fee details',iframe:true})
}
function callBack(tp)
{
alert(tp);
}
Sub window code:
function closeWin()
{
window.parent.ymPrompt.doHandler('error',true);
}
In this way, when the button of the child window triggers closeWin, the "error" value is passed back to the parameter tp of the callback function of the parent window. The true parameter is to automatically close the child window.
Attachment:
ymPrompt download