1
0
-1

Hi

Am trying to close current window from customHTML Java script. But this code makes my editor window close on loading.

Is any solution to prevent executing js in editor forms?

<script>
      $(document).ready(function(){
        $("#submit").hide();
        var refresh="#requestParam.isRefresh#";
        if(refresh=="yes"){
            $("#submit").click();
        }else{
            console.log("no");
            window.close();// This one closes editor window
        }
      });
</script>
    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi, if you are using custom code to close the window, why not check for the existence of the editor window first? Use the browser developer tool to inspect and find the id or class of the editor window.

        CommentAdd your comment...