本文介绍了每次我在IE8Version中展开和折叠树视图时都会询问确认消息。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在我的网页上,当我离开页面并浏览新页面时,我会显示确认消息。它工作正常。但我的一个页面有树视图。在该页面上,每次我展开和折叠树视图时都会询问确认消息。我们如何避免它。请帮我解决这个问题。

我的编码是



Hi
In my webpage, I show confirm message when I leave the page and navigate new page. It is working fine. But one of my page has treeview. On that page only every time I expand and collapse treeview It asks confirmation message. How we avoid it. Please help me, for this problem.
My coding is

<script type="text/javascript" language="javascript">
       window.onbeforeunload = function () {
          
           if (document.getElementById("<%=hdnSavingMode.ClientID %>").value.toUpperCase() == 'TRUE') {
               return "Do you want to leave this page without saving?";

           }
       };
    </script>





只有IE不在Firefox中。我正在使用IE 8版本。



It happens only IE not in firefox. I am using IE 8 version.

推荐答案

<script type="text/javascript" language="javascript">
       window.onbeforeunload = function (event) {
          
           if (document.getElementById("<%=hdnSavingMode.ClientID %>").value.toUpperCase() == 'TRUE') {
               if(event != null && typeof(event) != 'undefined')
                   event.returnValue = "Do you want to leave this page without saving?";
               return "Do you want to leave this page without saving?";
 
           }
       };
    </script>


<asp:UpdatePanel ID="UpdatePanel2" runat="server">
                                  <ContentTemplate>

                                  </ContentTemplate>
                              </asp:UpdatePanel>




树视图中的
在服务器中展开和折叠一边?,尝试扩展和折叠客户端。一边





问候

Aravind



in treeview expand and collapse u did in server side ?,try to expand and collapse form client. side


regards
Aravind


这篇关于每次我在IE8Version中展开和折叠树视图时都会询问确认消息。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 18:17