Disable “Changes you made may not be saved” pop-up window

后端 未结 3 1017
谎友^
谎友^ 2020-12-03 10:45

I use the following frontend code to export a .csv document.

HTML

  
3条回答
  •  無奈伤痛
    2020-12-03 11:11

    I've had the same error with embedding Google-Form in Chrome,

    I can verify that none of the found solutions helped me. Here is the screenshot of my pop-up:

    The only solution I've managed to implement was hiding the element and then unhiding/creating the new iframe with the current embed. Here's the part of my code:

           if (oldvalue !== value) { // checks the id of the form (value) is not the same
             // set value of the id
             $('#info').text(value); 
             // check the element exists
             let exists = value;
             if($("#" + value).length == 0) {
               //it doesn't exist
               exists = false;
             }
             // hide all child elements of the div for forms
             parent.children().hide();
             // create new node if needed
             if (!exists)
             {
               // create new form element and embed the form
               $("#google-form").clone().attr("id",value).attr('src', record.url).appendTo(parent);
             }
             // unhide error element
             $("#" + value).show();
           }
    

    The full code of my solution is here.

提交回复
热议问题