jquery: Object doesn't support property or method 'dialog' jquery.1.12.4.js, asp.net

Hi, Please let me know how to fix this issue.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="default" MasterPageFile="~/Masterpage.Master"%>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp"%>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
  <iframe id="frameName1" src="index.aspx" frameborder="0" scrolling="auto" width="30%" height="1000px" align="left"></iframe>
     <iframe id="frameName2" src="home.htm" frameborder="0" scrolling="auto" width="70%" height="1000px" align="right"></iframe>
     
 
         <script src="scripts/jquery-1.12.4.js" type="text/javascript"></script>
    <script type="text/javascript">
var sessionTimeout = "<%= Session.Timeout %>";
function DisplaySessionTimeout(timeout) {
    var seconds = timeout / 1000;
    document.getElementsByName("seconds").innerHTML = seconds;
    setInterval(function () {
        seconds--;
        document.getElementById("seconds").innerHTML = seconds;
    }, 1000);
    setTimeout(function () {
        //Show Popup before 20 seconds of timeout.
        $("#ExpireConfirm_Submit").dialog({
            height: 200,
            width: 400,
            resizable: false,               
            modal: true,               
            title: "Session Expire Confirmation",                             
            open: function () {
                $('p#id1').html(sessionTimeout);
            },
            buttons: {
                "Yes": function () {                       
                    $(location).attr("href", "SessionExpired.aspx").submit();
                    $(this).dialog("close");
                },
                "No": function () {                       
                    ResetSession();
                    $(this).dialog("close");
                }
            }
        }).prev(".ui-dialog-titlebar").css("background", "red");
    }, timeout - 55 * 1000);
    setTimeout(function () {
        $(location).attr("href", "SessionExpired.aspx").submit();
    }, timeout);
};
function ResetSession() {
    window.location = window.location.href;
}   
</script>
 
     <div id="ExpireConfirm_Submit">
<table>
    <tr>
        <td style="width: 230px;">
            Your Session will expire in <span id="seconds"></span>&nbsp;seconds.<br />
            Please submit/update your changes or you will loose your data.
        </td>
    </tr>
</table></div>
    </asp:Content>

Open in new window

Saroj13Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

zephyr_hex (Megan)DeveloperCommented:
jQuery dialog requires jQuery UI.

<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>

Open in new window

You'll also want the CSS
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">

Open in new window


More:
https://jqueryui.com/dialog/
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jim RiddlesPrepress/OMS SpecialistCommented:
You need to include a reference to jQueryUI to use modal dialogs.  You would include it after line 11 in your code.

Here's a link to a page that has links to all jQueryUI version:
https://code.jquery.com/ui/
0
Jim RiddlesPrepress/OMS SpecialistCommented:
The solutions provided answer the author's question.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.