Today, the ymPrompt win method is used to pop up a window. Because it is necessary to use the value returned from the subwindow to determine whether to refresh the parent window, the ymPrompt component Demo has not found a proper method to achieve this, so I am still not worried, I checked the introduced method from the beginning to the end, and saw two parameters sign and autoClose in doHandler. After reading the method introduction, I thought this method was feasible (previously I used ymPrompt. close method to close the subwindow directly), write a script for testing, you can achieve what I want, and now paste the Code as follows:
Parent window code:
The Code is as follows:
Function viewSubFeeDetail (feeId)
{
YmPrompt. win ({message: 'viewsubfeedetail. action? FeeId = '+ feeId, handler: callBack, width: 800, height: 400, title: 'tariff details information', iframe: true })
}
Function callBack (tp)
{
Alert (tp );
}
Subwindow code:
The Code is as follows:
Function closeWin ()
{
Window. parent. ymPrompt. doHandler ('error', true );
}
In this way, when the subwindow button triggers closeWin, the "error" value is returned to the tp parameter of the callback function of the parent window. The true parameter is to automatically close the subwindow.
Attachment: ymPrompt download