Click here to Skip to main content
15,889,863 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
I'm implementing the modal popop window using this EXCELENT article:

http://www.codeproject.com/Articles/589445/JavaScript-Modal-Popup-Window

I'm using the "Show URL Window".
All is working as in the example. But I need to close the popup when user confirm data instead of show the "USer Information" popup an the click to OK to go pack to parent window.
I would like to return to parent once user confirm data.
I've tried to put bailwal_modalPopupWindow.HideModalPopUp() here:


function EnrollNowClick() {
PassValueToParentWindow();
bailwal_modalPopupWindow.HideModalPopUp();

//window.parent.modalWin.CallCallingWindowFunction(0, 'User Enrolled Scucessfully');
}

but no way.

Could you tell me please how to do it?
Thanks

What I have tried:

function EnrollNowClick() {
PassValueToParentWindow();
bailwal_modalPopupWindow.HideModalPopUp();

//window.parent.modalWin.CallCallingWindowFunction(0, 'User Enrolled Scucessfully');
}
Posted
Comments
Richard MacCutchan 6-Oct-16 5:28am    
A modal popup will not close until the user clicks the OK or Cancel button. This is by design.
Member 2160987 6-Oct-16 6:09am    
Sure, I know.
But if you see the sample mentioned in the link, I'm tying the "Show URL Window".
I want that when user click on "Enroll Now" button ...or "Enroll LAter" button, the popup closes. But no way! In the example, another popup appears saying "succesfully" and user has to click on "ok" to return to parent.
Please help. It seems to be so simple.... but I can't do it.
Richard MacCutchan 6-Oct-16 6:49am    

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900