$(&## dialog")。dialog(" open")无效 [英] $( "#dialog" ).dialog( "open" ) is not working

查看:70
本文介绍了$(&## dialog")。dialog(" open")无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hai All,



$(#dialog)。dialog(open);是不是在一个页面上工作



我在同一个项目中的另一个页面中实现了这个功能。工作正常但它在其他页面中不起作用..



我的代码如下所示





Hai All,

$( "#dialog" ).dialog( "open" ); is not working in one page

I implemented this function in one another page in the same project.its working fine but It not working in other page..

My code shown as follows


<div id="divAlert">Your session will expire in another 1 minute(s)! Please respond before the session expires</div>







<script language="javascript" type="text/javascript" charset="utf-8">

            $("#divAlert").dialog({
                width: 400,
                height: 150,
                autoOpen: false,
                modal: true,
                resizable: false,
                autoResize: true,
                close: function () { }
            });

var authorized = "<%= HttpContext.Current.User.Identity.IsAuthenticated.ToString().ToLower() %>";
            if (getAbsolutePath().toLowerCase() == 'sessionexpired.aspx') {
                authorized = "false";
                //alert(authorized);
            }
            if (authorized == "true") {
                var sessionTimeoutWarning = "<%= Session.Timeout %>";
                sessionTimeoutWarning = sessionTimeoutWarning - 1;
                var sessionTimeout = "<%= Session.Timeout %>";
                var sTimeout = parseInt(sessionTimeoutWarning) * 60 * 1000;
                setTimeout('SessionWarning()', sTimeout);
                function SessionWarning() {
//                    var message = "Your session will expire in another " + (parseInt(sessionTimeout) - parseInt(sessionTimeoutWarning)) + " minute(s)! Please respond before the session expires";
//                    alert(message);
                    $("#divAlert").dialog("open");
                }


</script>





这个问题是什么.. 。?请尽快帮助我



谢谢Advnc

Aatif Ali



whats the prblem ...? Please Help me asap

Thanks Advnc
Aatif Ali

推荐答案

( #dialog)。dialog(开放);是不是在一个页面上工作



我在同一个项目中的另一个页面中实现了这个功能。工作正常但它在其他页面中不起作用..



我的代码如下所示





( "#dialog" ).dialog( "open" ); is not working in one page

I implemented this function in one another page in the same project.its working fine but It not working in other page..

My code shown as follows


<div id="divAlert">Your session will expire in another 1 minute(s)! Please respond before the session expires</div>







<script language="javascript" type="text/javascript" charset="utf-8">


#divAlert)。dialog({
width: 400
height: 150
autoOpen: false
modal: true
可调整大小: false
autoResize: true
close: function (){}
});

var authorized = <%= HttpContext.Current.User.Identity.IsAuthenticated.ToString()。ToLower()%>;
if (getAbsolutePath()。toLowerCase()== ' sessionexpired.aspx'){
authorized = false;
// alert(授权);
}
if (authorized == true){
var sessionTimeoutWarning = <%= Session.Timeout%>;
sessionTimeoutWarning = sessionTimeoutWarning - 1 ;
var sessionTimeout = <%= Session.Timeout%>;
var sTimeout = parseInt (sessionTimeoutWarning)* 60 * 1000 ;
setTimeout(' SessionWarning()',sTimeout);
function SessionWarning(){
// var message =您的会话将在另一个+(parseInt(sessionTimeout) - parseInt(sessionTimeoutWarning))+分钟到期!请在会话到期前回复;
< span class =code-comment> // alert(message);
("#divAlert").dialog({ width: 400, height: 150, autoOpen: false, modal: true, resizable: false, autoResize: true, close: function () { } }); var authorized = "<%= HttpContext.Current.User.Identity.IsAuthenticated.ToString().ToLower() %>"; if (getAbsolutePath().toLowerCase() == 'sessionexpired.aspx') { authorized = "false"; //alert(authorized); } if (authorized == "true") { var sessionTimeoutWarning = "<%= Session.Timeout %>"; sessionTimeoutWarning = sessionTimeoutWarning - 1; var sessionTimeout = "<%= Session.Timeout %>"; var sTimeout = parseInt(sessionTimeoutWarning) * 60 * 1000; setTimeout('SessionWarning()', sTimeout); function SessionWarning() { // var message = "Your session will expire in another " + (parseInt(sessionTimeout) - parseInt(sessionTimeoutWarning)) + " minute(s)! Please respond before the session expires"; // alert(message);


#divAlert)。dialog( );
}


< / script>
("#divAlert").dialog("open"); } </script>





这个问题是什么.. 。?请尽快帮帮我



谢谢Advnc

Aatif Ali



whats the prblem ...? Please Help me asap

Thanks Advnc
Aatif Ali


这篇关于$(&## dialog&quot;)。dialog(&quot; open&quot;)无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆