i have genrate a confirm message for session extend and it work properly. but i want that if user not respond to it than it will automatically hide.i have write following code .


if($("#takephotopageload").length > 0) {
        setInterval(function(){
          $.ajax({
            url: "check_session.php",
            //data: {action: 'clickme_clicked'},
            dataType: "json",
            success: function(data) {

              if(data.time > idletimeout) {
                var answer = confirm("Your session has expired. Would you like to extend it?");
                setInterval(function () { window.confirm.dialog("close"); }, 3000);

                if(answer == true) {

                  $.ajax({
                    url: "reactivate_session.php",
                    dataType: "json",
                    success: function() {},
                  });
                } else {
                  window.location.reload(true);
                }
              }
            }
          });
        },3000);
      }

hey i have use this line of code for auto hide confirm dialoge box if user not respond to it in 3 second but it not work.
setInterval(function () { window.confirm.dialog("close"); }, 3000);
please give me some needful suggestion.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.