Submit a form in a popup, and then close the popup

后端 未结 5 1711
终归单人心
终归单人心 2020-12-13 05:23

This seemed so trivial when I started off with it! My objective is this:

  • When user clicks on a button, open up a form in a new window.
  • Once the form
5条回答
  •  一生所求
    2020-12-13 05:35

    I have executed the code in my machine its working for IE and FF also.

    function closeSelf(){
        // do something
    
        if(condition satisfied){
           alert("conditions satisfied, submiting the form.");
           document.forms['certform'].submit();
           window.close();
        }else{
           alert("conditions not satisfied, returning to form");    
        }
    }
    
    
    
    Certificate 1:
    Certificate 2:
    Certificate 3:
    // change the submit button to normal button

提交回复
热议问题