i am starting a new project. i need to create a ajax or jQuery to control the parent page's form submission when user click button in popup window.
- click the button on submit form in parent window.
- in submit form javascript before return of submit form function, i need to add a popup window (child window), there is a "Close" button.
- the program will suspend until user click "Close" button in popup window. then the parent window need to detect the popup window close, once the popup window close, then it will continue submitform function going to return the form.
may i know how to prepare, any sample code for my reference.
function submitform(){
//validation checking
window.open(.., messageDialog, ''); //i want to popup a reminder message dialog, user need to click "Close" button once they read the message.
if (window.close){
return;
}
}