Note that there are some explanatory texts on larger screens.

plurals
  1. POIssue when combining Impromptu and Ideal tme out plug in
    primarykey
    data
    text
    <p>As per my requirement i am working with custom alerts, after a research i found these two as per my need</p> <p>For ideal time out</p> <p><a href="http://www.erichynds.com/jquery/a-new-and-improved-jquery-idle-timeout-plugin/" rel="nofollow noreferrer">http://www.erichynds.com/jquery/a-new-and-improved-jquery-idle-timeout-plugin/</a></p> <p>For Pop up</p> <p><a href="http://www.clientsideasp.net/2009/06/16/showing-beautiful-message-boxes-in-aspnet-web-forms-using-jquery-impromptu/#comment-209" rel="nofollow noreferrer">http://www.clientsideasp.net/2009/06/16/showing-beautiful-message-boxes-in-aspnet-web-forms-using-jquery-impromptu/#comment-209</a></p> <p>Combining these two my design is as follows</p> <pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default5.aspx.cs" Inherits="Default5" %&gt; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head id="Head1" runat="server"&gt; &lt;title&gt;Untitled Page&lt;/title&gt; &lt;link href="impromptu/impromptu.css" rel="stylesheet" type="text/css" /&gt; &lt;script src="impromptu/jquery.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="impromptu/jquery-impromptu.2.6.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;link href="jquery-ui.css" type="text/css" rel="stylesheet" /&gt; &lt;script src="Timer.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="idletimeout.js" type="text/javascript"&gt;&lt;/script&gt; &lt;style type="text/css"&gt; html, body { margin: 0; padding: 0; font: 12px Helvetica, Arial, sans-serif; } #content { padding: 10px; } a { color: #477099; } #bar { background: #252823; padding: 5px 10px; border-bottom: 4px solid #C3D3DA; } #bar h1 { margin: 0; padding: 0; color: #fff; font-size: 40px; letter-spacing: -1px; text-shadow: 0 0 4px #000000; } #bar h1 span { color: #C3D3DA; } #bar div { float: right; margin-top: -50px; padding: 20px 20px 0 0; } #bar a { color: #fff; text-decoration: none; } #bar div a:hover { text-decoration: underline; } &lt;/style&gt; &lt;script language="javascript" type="text/javascript"&gt; function confirmSubmit() { var inputs = document.getElementsByTagName("input"); var flag = 0; for (var i = 0; i &lt; inputs.length; i++) { if (inputs[i].type == "checkbox") { if (inputs[i].checked) { flag = 1; break; } } } if (flag == 0) { $.prompt('Select One?' , { buttons: { Ok: true } } ); } else { $.prompt('Are you sure you want to submit?' , { buttons: { Ok: true, Cancel: false } , callback: confirmSubmitResult } ); } return false; } function confirmSubmitResult(v, m, f) { if (v) //post back if the user clicked OK $('#&lt;%= btnSubmit.ClientID %&gt;').click(); } &lt;/script&gt; &lt;style type="text/css"&gt; a.ui-dialog-titlebar-close { display: none; } &lt;/style&gt; &lt;script type="text/javascript"&gt; // setup the dialog $("#demo").dialog({ autoOpen: false, modal: true, width: 400, height: 200, closeOnEscape: false, draggable: false, resizable: false, buttons: { 'Yes, Keep Working': function () { $(this).dialog('close'); }, 'No, Logoff': function () { // fire whatever the configured onTimeout callback is. // using .call(this) keeps the default behavior of "this" being the warning // element (the dialog in this case) inside the callback. $.idleTimeout.options.onTimeout.call(this); } } }); // cache a reference to the countdown element so we don't have to query the DOM for it on each ping. var $countdown = $("#dialog-countdown"); // start the idle timer plugin $.idleTimeout('#demo', 'div.ui-dialog-buttonpane button:first', { idleAfter: 5, pollingInterval: 2, keepAliveURL: 'keepalive.php', serverResponseEquals: 'OK', onTimeout: function () { window.location = "Handler.ashx"; }, onIdle: function () { $(this).dialog("open"); }, onCountdown: function (counter) { $countdown.html(counter); // update the counter } }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;form id="form1" runat="server"&gt; &lt;div&gt; &lt;div id="demo" style="display: none;" title="Your session is about to expire!"&gt; &lt;p&gt; &lt;span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 50px 0;"&gt;&lt;/span&gt; You will be logged off in &lt;span id="dialog-countdown" style="font-weight: bold"&gt; &lt;/span&gt;seconds. &lt;/p&gt; &lt;p&gt; Do you want to continue your session?&lt;/p&gt; &lt;/div&gt; &lt;h1&gt; Keep Idle for 5 Seconds&lt;/h1&gt; Name: &lt;asp:TextBox runat="server" ID="txtName" /&gt; &lt;br /&gt; &lt;br /&gt; &lt;asp:CheckBox ID="chk" runat="server" Text="Check" /&gt; &lt;asp:CheckBox ID="CheckBox1" runat="server" Text="Check" /&gt; &lt;!-- The button which will display the delete confirmation --&gt; &lt;input type="button" onclick="return confirmSubmit();" value="Submit" /&gt; &lt;!-- Hidden command button that actually issues the delete --&gt; &lt;asp:Button runat="server" ID="btnSubmit" Style="display: none;" OnClick="btnSubmit_Click" /&gt; &lt;!-- Explanation --&gt; &lt;/div&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>But the alerts are not getting displayed as per my requirement. Can any one help me..</p> <p>Error when clicking button</p> <p><img src="https://i.stack.imgur.com/WGVWX.jpg" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload